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

Method jrdTransactionEnd

src/jrd/extds/ExtDS.cpp:1720–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1718}
1719
1720void Transaction::jrdTransactionEnd(thread_db* tdbb, jrd_tra* transaction,
1721 bool commit, bool retain, bool force)
1722{
1723 Transaction* tran = transaction->tra_ext_common;
1724 while (tran)
1725 {
1726 Transaction* next = tran->m_nextTran;
1727 try
1728 {
1729 if (commit)
1730 tran->commit(tdbb, retain);
1731 else
1732 tran->rollback(tdbb, retain);
1733 }
1734 catch (const Exception&)
1735 {
1736 if (!force || commit)
1737 throw;
1738
1739 // ignore rollback error
1740 fb_utils::init_status(tdbb->tdbb_status_vector);
1741 tran->detachFromJrdTran();
1742 }
1743 tran = next;
1744 }
1745}
1746
1747// Statement
1748

Callers

nothing calls this directly

Calls 4

init_statusFunction · 0.85
detachFromJrdTranMethod · 0.80
commitMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected