Skip to content

Commit 2caa4f7

Browse files
committed
Additional patch for CORE-6015 : Segfault when using expression index with complex expression.
1 parent d0d7a20 commit 2caa4f7

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/jrd/vio.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,16 @@ inline void waitGCActive(thread_db* tdbb, const record_param* rpb)
297297
Lock temp_lock(tdbb, sizeof(SINT64), LCK_record_gc);
298298
temp_lock.setKey(((SINT64) rpb->rpb_page << 16) | rpb->rpb_line);
299299

300-
if (!LCK_lock(tdbb, &temp_lock, LCK_SR, LCK_WAIT))
300+
SSHORT wait = LCK_WAIT;
301+
302+
jrd_tra* transaction = tdbb->getTransaction();
303+
if (transaction->tra_number == rpb->rpb_transaction_nr)
304+
{
305+
// There is no sense to wait for self
306+
wait = LCK_NO_WAIT;
307+
}
308+
309+
if (!LCK_lock(tdbb, &temp_lock, LCK_SR, wait))
301310
ERR_punt();
302311

303312
LCK_release(tdbb, &temp_lock);

0 commit comments

Comments
 (0)