mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
Frontported bugfix for blob access vs replicator
This commit is contained in:
parent
54c00d050d
commit
97358d012c
@ -523,6 +523,7 @@ void REPL_store(thread_db* tdbb, const record_param* rpb, jrd_tra* transaction)
|
||||
// This temporary auto-pointer is just to delete a temporary record
|
||||
AutoPtr<Record> cleanupRecord(record != rpb->rpb_record ? record : nullptr);
|
||||
AutoSetRestoreFlag<ULONG> noRecursion(&tdbb->tdbb_flags, TDBB_repl_in_progress, true);
|
||||
AutoSetRestoreFlag<ULONG> noBlobCheck(&transaction->tra_flags, TRA_no_blob_check, true);
|
||||
|
||||
ReplicatedRecordImpl replRecord(tdbb, relation, record);
|
||||
|
||||
@ -571,6 +572,7 @@ void REPL_modify(thread_db* tdbb, const record_param* orgRpb,
|
||||
}
|
||||
|
||||
AutoSetRestoreFlag<ULONG> noRecursion(&tdbb->tdbb_flags, TDBB_repl_in_progress, true);
|
||||
AutoSetRestoreFlag<ULONG> noBlobCheck(&transaction->tra_flags, TRA_no_blob_check, true);
|
||||
|
||||
ReplicatedRecordImpl replOrgRecord(tdbb, relation, orgRecord);
|
||||
ReplicatedRecordImpl replNewRecord(tdbb, relation, newRecord);
|
||||
@ -605,6 +607,7 @@ void REPL_erase(thread_db* tdbb, const record_param* rpb, jrd_tra* transaction)
|
||||
// This temporary auto-pointer is just to delete a temporary record
|
||||
AutoPtr<Record> cleanupRecord(record != rpb->rpb_record ? record : nullptr);
|
||||
AutoSetRestoreFlag<ULONG> noRecursion(&tdbb->tdbb_flags, TDBB_repl_in_progress, true);
|
||||
AutoSetRestoreFlag<ULONG> noBlobCheck(&transaction->tra_flags, TRA_no_blob_check, true);
|
||||
|
||||
ReplicatedRecordImpl replRecord(tdbb, relation, record);
|
||||
|
||||
|
@ -3440,6 +3440,9 @@ static void transaction_options(thread_db* tdbb,
|
||||
transaction->tra_flags |= TRA_read_consistency | TRA_rec_version;
|
||||
}
|
||||
|
||||
if (transaction->tra_attachment->isGbak())
|
||||
transaction->tra_flags |= TRA_no_blob_check;
|
||||
|
||||
// If there aren't any relation locks to seize, we're done.
|
||||
|
||||
vec<Lock*>* vector = transaction->tra_relation_locks;
|
||||
@ -4064,11 +4067,11 @@ void jrd_tra::releaseSavepoint(thread_db* tdbb)
|
||||
|
||||
void jrd_tra::checkBlob(thread_db* tdbb, const bid* blob_id, jrd_fld* fld, bool punt)
|
||||
{
|
||||
USHORT rel_id = blob_id->bid_internal.bid_relation_id;
|
||||
const USHORT rel_id = blob_id->bid_internal.bid_relation_id;
|
||||
|
||||
if (tra_attachment->isGbak() ||
|
||||
(tra_attachment->locksmith(tdbb, SELECT_ANY_OBJECT_IN_DATABASE)) ||
|
||||
rel_id == 0)
|
||||
if (rel_id == 0 ||
|
||||
(tra_flags & TRA_no_blob_check) ||
|
||||
(tra_attachment->locksmith(tdbb, SELECT_ANY_OBJECT_IN_DATABASE)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -433,6 +433,7 @@ const ULONG TRA_own_interface = 0x20000L; // tra_interface was created for int
|
||||
const ULONG TRA_read_consistency = 0x40000L; // ensure read consistency in this transaction
|
||||
const ULONG TRA_ex_restart = 0x80000L; // Exception was raised to restart request
|
||||
const ULONG TRA_replicating = 0x100000L; // transaction is allowed to be replicated
|
||||
const ULONG TRA_no_blob_check = 0x200000L; // disable blob access checking
|
||||
|
||||
// flags derived from TPB, see also transaction_options() at tra.cpp
|
||||
const ULONG TRA_OPTIONS_MASK = (TRA_degree3 | TRA_readonly | TRA_ignore_limbo | TRA_read_committed |
|
||||
|
Loading…
Reference in New Issue
Block a user