| 4689 | |
| 4690 | |
| 4691 | static 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 | |
| 4723 | static void check_rel_field_class(thread_db* tdbb, |
no test coverage detected