Walter R. Ojeda Valiente wrote:

Do you know why this simple trigger "hang-up" the database?

CREATE TRIGGER TRANSACCION_INICIA
ACTIVE ON TRANSACTION START
POSITION 0
AS
BEGIN
   IN AUTONOMOUS TRANSACTION DO BEGIN
   /* code */
   END
END;

Always when I put "IN AUTONOMOUS TRANSACTION" the database crash. Without those words everything works fine.

It is not possible to use autonomous transactions inside a database trigger?

Helen Borrie answers:

From the forthcoming Firebird 2.5 Language Reference manual (yes, people, it is coming!)

Some Caveats:

The use of the IN AUTONOMOUS TRANSACTION DO statement in the database event triggers related to transactions (TRANSACTION START, TRANSACTION ROLLBACK, TRANSACTION COMMIT) may cause the autonomous transaction to enter an infinite loop

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Firebird Community

Published

Category

Gems from Firebird Support list

Tags