Skip to content

Commit

Permalink
Additional patch for CORE-6015 : Segfault when using expression index…
Browse files Browse the repository at this point in the history
… with complex expression.
  • Loading branch information
hvlad committed Apr 14, 2021
1 parent d0d7a20 commit 2caa4f7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/jrd/vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,16 @@ inline void waitGCActive(thread_db* tdbb, const record_param* rpb)
Lock temp_lock(tdbb, sizeof(SINT64), LCK_record_gc);
temp_lock.setKey(((SINT64) rpb->rpb_page << 16) | rpb->rpb_line);

if (!LCK_lock(tdbb, &temp_lock, LCK_SR, LCK_WAIT))
SSHORT wait = LCK_WAIT;

jrd_tra* transaction = tdbb->getTransaction();
if (transaction->tra_number == rpb->rpb_transaction_nr)
{
// There is no sense to wait for self
wait = LCK_NO_WAIT;
}

if (!LCK_lock(tdbb, &temp_lock, LCK_SR, wait))
ERR_punt();

LCK_release(tdbb, &temp_lock);
Expand Down

0 comments on commit 2caa4f7

Please sign in to comment.