mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
The simplest possible fix for CORE-3374: Server may crash or corrupt data if SELECT WITH LOCK is issued against records not in the latest format. Thanks to Vlad.
This commit is contained in:
parent
1d169c297e
commit
7208ae1755
@ -3297,9 +3297,6 @@ bool VIO_writelock(thread_db* tdbb, record_param* org_rpb, RecordSource* rsb,
|
||||
return false;
|
||||
}
|
||||
|
||||
// jrd_rel* relation = org_rpb->rpb_relation;
|
||||
|
||||
|
||||
if (org_rpb->rpb_transaction_nr == transaction->tra_number) {
|
||||
// We already own this record. No writelock required
|
||||
return true;
|
||||
@ -3320,6 +3317,10 @@ bool VIO_writelock(thread_db* tdbb, record_param* org_rpb, RecordSource* rsb,
|
||||
return false;
|
||||
}
|
||||
|
||||
// The record could be reallocated in the meantime. Reassign the pointer.
|
||||
|
||||
org_record = org_rpb->rpb_record;
|
||||
|
||||
/* Old record was restored and re-fetched for write. Now replace it. */
|
||||
|
||||
org_rpb->rpb_transaction_nr = transaction->tra_number;
|
||||
|
Loading…
Reference in New Issue
Block a user