You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the state of a database trigger of type "On Commit" from inactive to active, the state change has no effect on other already opened connections. [CORE6021]
#6271
Submitted by: Fernando Burciaga (fernando.burciaga)
When having a database with a transaction commit database trigger and changing its state from inactive to active and vice versa the state is not changed in already opened connections. If there are other open connections, the commits done on these other connections do not execute the on transacttion commit trigger. Only new connections and the connection which activated the trigger execute it when commiting a transaction.
With firebird version 2.5.8 the state change did affect other opened connections , but it doesn't with version 3.0.4.
Table triggers do not have the same behavior, when activating a table trigger, other connections do execute the trigger correctly, even on version 3.0.4.
Steps to reproduce:
--- Create table in which the time of commit will be inserted by database trigger for every transaction commit ---
CREATE TABLE COMMITED(
COMMITED_TIME VARCHAR(50)
);
--- create inactive on transaction commit trigger ---
CREATE TRIGGER TR_ONCOMMIT_TIME INACTIVE ON TRANSACTION COMMIT
AS
BEGIN
INSERT INTO COMMITED(COMMITED_TIME)
VALUES (CURRENT_TIME);
END;
--- Open 2 connections at the same time for the database ---
--- On connection 1 change the trigger status to ACTIVE ---
ALTER TRIGGER TR_ONCOMMIT_TIME ACTIVE
--- Start doing commits on both connections. Commits on connection 1 should start inserting into table COMMITED for every commit made, while connection 2 will not. ---
This same test has different behavior on versions 2.5.8 and 3.0.4
The text was updated successfully, but these errors were encountered:
Submitted by: Fernando Burciaga (fernando.burciaga)
When having a database with a transaction commit database trigger and changing its state from inactive to active and vice versa the state is not changed in already opened connections. If there are other open connections, the commits done on these other connections do not execute the on transacttion commit trigger. Only new connections and the connection which activated the trigger execute it when commiting a transaction.
With firebird version 2.5.8 the state change did affect other opened connections , but it doesn't with version 3.0.4.
Table triggers do not have the same behavior, when activating a table trigger, other connections do execute the trigger correctly, even on version 3.0.4.
Steps to reproduce:
--- Create table in which the time of commit will be inserted by database trigger for every transaction commit ---
CREATE TABLE COMMITED(
COMMITED_TIME VARCHAR(50)
);
--- create inactive on transaction commit trigger ---
CREATE TRIGGER TR_ONCOMMIT_TIME INACTIVE ON TRANSACTION COMMIT
AS
BEGIN
INSERT INTO COMMITED(COMMITED_TIME)
VALUES (CURRENT_TIME);
END;
--- Open 2 connections at the same time for the database ---
--- On connection 1 change the trigger status to ACTIVE ---
ALTER TRIGGER TR_ONCOMMIT_TIME ACTIVE
--- Start doing commits on both connections. Commits on connection 1 should start inserting into table COMMITED for every commit made, while connection 2 will not. ---
This same test has different behavior on versions 2.5.8 and 3.0.4
The text was updated successfully, but these errors were encountered: