Subject Re: [firebird-support] Re: FB 2.1 - new DB trigger feature with MON$ tables
Author Dmitry Yemanov
Leyne, Sean wrote:
>
> If the transaction context is 'lost' then what is the purpose of
> allowing Transaction triggers???

Transaction context is not 'lost' per se. What is lost is a link between
an active statement and its transaction and this is done when a
statement fails, without any relationship to a commit/rollback. As you
perhaps know, prepared but inactive statements are not bound to any
particular transactions, such a linkage is performed upon the execute
call. The link is destroyed when the statement ends its execution,
either naturally or by exception. This is how the engine works since the
very beginning and it has no dependencies with the monitoring tables or
transaction-level triggers.

Tracking failed statements inside a rollback trigger is not something
I'd call a natural way of using those features. A runtime statement
failure and a rollback are not necessarily related things, and a huge
time gap is possible between them.


Dmitry