MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / rollback

Function rollback

src/jrd/jrd.cpp:7878–7915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7876
7877
7878static void rollback(thread_db* tdbb, jrd_tra* transaction, const bool retaining_flag)
7879{
7880/**************************************
7881 *
7882 * r o l l b a c k
7883 *
7884 **************************************
7885 *
7886 * Functional description
7887 * Abort a transaction.
7888 *
7889 **************************************/
7890 if (transaction->tra_in_use)
7891 Arg::Gds(isc_transaction_in_use).raise();
7892
7893 ThreadStatusGuard tempStatus(tdbb);
7894
7895 const Database* const dbb = tdbb->getDatabase();
7896 const Jrd::Attachment* const attachment = tdbb->getAttachment();
7897
7898 if (!(attachment->att_flags & ATT_no_db_triggers))
7899 {
7900 try
7901 {
7902 ThreadStatusGuard tempStatus2(tdbb);
7903 // run ON TRANSACTION ROLLBACK triggers
7904 EXE_execute_db_triggers(tdbb, transaction, TRIGGER_TRANS_ROLLBACK);
7905 }
7906 catch (const Exception&)
7907 {
7908 if (dbb->dbb_flags & DBB_bugcheck)
7909 throw;
7910 }
7911 }
7912
7913 tdbb->setTransaction(transaction);
7914 TRA_rollback(tdbb, transaction, retaining_flag, false);
7915}
7916
7917
7918static void setEngineReleaseDelay(Database* dbb)

Callers 4

JRD_rollback_transactionFunction · 0.85
JRD_rollback_retainingFunction · 0.85
deprecatedRollbackMethod · 0.85

Calls 7

GdsClass · 0.85
EXE_execute_db_triggersFunction · 0.85
TRA_rollbackFunction · 0.85
getDatabaseMethod · 0.80
raiseMethod · 0.45
getAttachmentMethod · 0.45
setTransactionMethod · 0.45

Tested by

no test coverage detected