Skip to content

Commit 5ee71b6

Browse files
committed
Fix #8799: BUGCHECK "decompression overran buffer (179)" when WITH LOCK clause is used (#8803)
VIO_writelock creates new_rpb by copying from org_rpb which has rpb_delta flag set. new_rpb is passed to prepare_update. It creates a delta but its size exceeds the limit (1024) so the current version is stored as a regular record. The problem is that rpb_delta flag remains set for new_rpb, and then replace_record sets it in the header of the primary version. From this moment any attempt to get data of older versions fails.
1 parent 63db1b3 commit 5ee71b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/jrd/vio.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6114,6 +6114,8 @@ static PrepareResult prepare_update(thread_db* tdbb, jrd_tra* transaction, TraNu
61146114

61156115
if (new_rpb)
61166116
{
6117+
new_rpb->rpb_flags &= ~rpb_delta;
6118+
61176119
// If both descriptors share the same record, there cannot be any difference.
61186120
// This trick is used by VIO_writelock(), but can be a regular practice as well.
61196121
if (new_rpb->rpb_address == temp->rpb_address)

0 commit comments

Comments
 (0)