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

Function start_transaction

src/jrd/jrd.cpp:9598–9647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9596
9597
9598static void start_transaction(thread_db* tdbb, bool transliterate, jrd_tra** tra_handle,
9599 Jrd::Attachment* attachment, unsigned int tpb_length, const UCHAR* tpb)
9600{
9601/**************************************
9602 *
9603 * s t a r t _ m u l t i p l e
9604 *
9605 **************************************
9606 *
9607 * Functional description
9608 * Start a transaction.
9609 *
9610 **************************************/
9611 fb_assert(attachment == tdbb->getAttachment());
9612
9613 try
9614 {
9615 if (*tra_handle)
9616 status_exception::raise(Arg::Gds(isc_bad_trans_handle));
9617
9618
9619 try
9620 {
9621 if (tpb_length > 0 && !tpb)
9622 status_exception::raise(Arg::Gds(isc_bad_tpb_form));
9623
9624 jrd_tra* transaction = TRA_start(tdbb, tpb_length, tpb);
9625
9626 // run ON TRANSACTION START triggers
9627 JRD_run_trans_start_triggers(tdbb, transaction);
9628
9629 *tra_handle = transaction;
9630 }
9631 catch (const Exception& ex)
9632 {
9633 if (transliterate)
9634 {
9635 FbLocalStatus tempStatus;
9636 transliterateException(tdbb, ex, &tempStatus, "startTransaction");
9637 status_exception::raise(&tempStatus);
9638 }
9639 throw;
9640 }
9641 }
9642 catch (const Exception&)
9643 {
9644 *tra_handle = NULL;
9645 throw;
9646 }
9647}
9648
9649
9650void JRD_start_transaction(thread_db* tdbb, jrd_tra** transaction,

Callers 2

startTransactionMethod · 0.85
JRD_start_transactionFunction · 0.85

Calls 6

raiseFunction · 0.85
GdsClass · 0.85
TRA_startFunction · 0.85
transliterateExceptionFunction · 0.85
getAttachmentMethod · 0.45

Tested by

no test coverage detected