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

Function prepare_tra

src/jrd/jrd.cpp:7671–7697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7669
7670
7671static void prepare_tra(thread_db* tdbb, jrd_tra* transaction, USHORT length, const UCHAR* msg)
7672{
7673/**************************************
7674 *
7675 * p r e p a r e
7676 *
7677 **************************************
7678 *
7679 * Functional description
7680 * Attempt to prepare a transaction.
7681 *
7682 **************************************/
7683 SET_TDBB(tdbb);
7684
7685 if (transaction->tra_in_use)
7686 status_exception::raise(Arg::Gds(isc_transaction_in_use));
7687
7688 if (!(transaction->tra_flags & TRA_prepared))
7689 {
7690 // run ON TRANSACTION COMMIT triggers
7691 run_commit_triggers(tdbb, transaction);
7692 }
7693
7694 validateHandle(tdbb, transaction->tra_attachment);
7695 tdbb->setTransaction(transaction);
7696 TRA_prepare(tdbb, transaction, length, msg);
7697}
7698
7699
7700void release_attachment(thread_db* tdbb, Jrd::Attachment* attachment, XThreadEnsureUnlock* dropGuard)

Callers 1

prepareMethod · 0.85

Calls 7

SET_TDBBFunction · 0.85
raiseFunction · 0.85
GdsClass · 0.85
run_commit_triggersFunction · 0.85
validateHandleFunction · 0.85
TRA_prepareFunction · 0.85
setTransactionMethod · 0.45

Tested by

no test coverage detected