mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:40:38 +01:00
Bugfix CORE-5222: SELECT WITH LOCK may raise unexpected update conflict
errors under concurrent load.
This commit is contained in:
parent
3b0ee41625
commit
34399c1bf4
@ -214,13 +214,14 @@ bool RecordStream::refetchRecord(thread_db* tdbb) const
|
||||
|
||||
if (rpb->rpb_runtime_flags & RPB_refetch)
|
||||
{
|
||||
if (!VIO_refetch_record(tdbb, rpb, transaction, true, false))
|
||||
return false;
|
||||
|
||||
rpb->rpb_runtime_flags &= ~RPB_refetch;
|
||||
if (VIO_refetch_record(tdbb, rpb, transaction, true, false))
|
||||
{
|
||||
rpb->rpb_runtime_flags &= ~RPB_refetch;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RecordStream::lockRecord(thread_db* tdbb) const
|
||||
|
@ -3709,7 +3709,9 @@ bool VIO_writelock(thread_db* tdbb, record_param* org_rpb, jrd_tra* transaction)
|
||||
|
||||
if (org_rpb->rpb_runtime_flags & (RPB_refetch | RPB_undo_read))
|
||||
{
|
||||
VIO_refetch_record(tdbb, org_rpb, transaction, false, true);
|
||||
if (!VIO_refetch_record(tdbb, org_rpb, transaction, true, true))
|
||||
return false;
|
||||
|
||||
org_rpb->rpb_runtime_flags &= ~RPB_refetch;
|
||||
fb_assert(!(org_rpb->rpb_runtime_flags & RPB_undo_read));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user