Subject | Re: Fwd: Firebird MON$STATEMENTS table MON$TRANSACTION_ID field [null] |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-03-28T10:11Z |
26.03.2015 21:49, Mark Rotteveel wrote:
it does not include allocated handles that are not prepared yet.
unlinked from a transaction when it completes.
It also implies that even prepared but currently inactive (not yet
executed) statement is not linked to any transaction. Although the
prepare call requires a transaction handle, it does not cause any
"linkage" between them.
Dmitry
> The MON$STATEMENTS contains the statement handles in Firebird. TheAlmost correct. MON$STATEMENTS enlists only prepared statement handles,
> lifetime of a statement handle is separate from the transaction.
> Therefor if there is currently no transaction associated with the
> statement (eg: the statement handle has been created but not yet
> prepared or executed), then the transaction id is null.
it does not include allocated handles that are not prepared yet.
> Also if a statement has been executed with a transaction, it will beStatement is linked to a transaction when it starts its execution, and
> disassociated once the transaction has been committed or rolled back. I
> am not entirely sure, but I believe the transaction is also
> disassociated if the statement has completed (update, delete, etc), or -
> for select - the cursor has been explicitly closed/dropped or if all
> records have been read.
unlinked from a transaction when it completes.
It also implies that even prepared but currently inactive (not yet
executed) statement is not linked to any transaction. Although the
prepare call requires a transaction handle, it does not cause any
"linkage" between them.
Dmitry