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

Function check_precommitted

src/jrd/vio.cpp:4691–4720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4689
4690
4691static int check_precommitted(const jrd_tra* transaction, const record_param* rpb)
4692{
4693/*********************************************
4694 *
4695 * c h e c k _ p r e c o m m i t t e d
4696 *
4697 *********************************************
4698 *
4699 * Functional description
4700 * Check if precommitted transaction which created given record version is
4701 * current transaction or it is a still active and belongs to the current
4702 * attachment. This is needed to detect visibility of records modified in
4703 * temporary tables in read-only transactions.
4704 *
4705 **************************************/
4706 if (!(rpb->rpb_flags & rpb_gc_active) && rpb->rpb_relation->isTemporary())
4707 {
4708 if (transaction->tra_number == rpb->rpb_transaction_nr)
4709 return tra_us;
4710
4711 const jrd_tra* tx = transaction->tra_attachment->att_transactions;
4712 for (; tx; tx = tx->tra_next)
4713 {
4714 if (tx->tra_number == rpb->rpb_transaction_nr)
4715 return tra_active;
4716 }
4717 }
4718
4719 return tra_committed;
4720}
4721
4722
4723static void check_rel_field_class(thread_db* tdbb,

Callers 4

VIO_chase_record_versionFunction · 0.85
VIO_garbage_collectFunction · 0.85
VIO_get_currentFunction · 0.85
prepare_updateFunction · 0.85

Calls 1

isTemporaryMethod · 0.45

Tested by

no test coverage detected