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.
---------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-6021
URL: http://tracker.firebirdsql.org/browse/CORE-6021
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0.4
Environment: Windows 10 x64, Firebird 3.0.3 SuperServer
Reporter: 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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel