COMMIT Options
-
The optional
TRANSACTION tr_nameclause, available only in Embedded SQL, specifies the name of the transaction to be committed.With noTRANSACTIONclause,COMMITis applied to the default transaction.NoteIn ESQL applications, named transactions make it possible to have several transactions active simultaneously in one application.If named transactions are used, a host-language variable with the same name must be declared and initialized for each named transaction.This is a limitation that prevents dynamic specification of transaction names and thus, rules out transaction naming in DSQL.
-
The keyword
RELEASEis available only in Embedded SQL and enables disconnection from all databases after the transaction is committed.RELEASEis retained in Firebird only for compatibility with legacy versions of InterBase.It has been superseded in ESQL by theDISCONNECTstatement. -
The
RETAIN [SNAPSHOT]clause is used for the “soft” commit, variously referred to amongst host languages and their practitioners asCOMMIT WITH RETAIN, “CommitRetaining”, “warm commit”, et al.The transaction is committed, but some server resources are retained and a new transaction is restarted transparently with the same Transaction ID.The state of row caches and cursors remains as it was before the soft commit.For soft-committed transactions whose isolation level is
SNAPSHOTorSNAPSHOT TABLE STABILITY, the view of database state does not update to reflect changes by other transactions, and the user of the application instance continues to have the same view as when the original transaction started.Changes made during the life of the retained transaction are visible to that transaction, of course.
|
Note
|
Recommendation
Use of the |