Skip to content

Commit 937a512

Browse files
authored
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 f3c5da8 commit 937a512

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
@@ -6557,6 +6557,8 @@ static PrepareResult prepare_update(thread_db* tdbb, jrd_tra* transaction, TraNu
65576557

65586558
if (new_rpb)
65596559
{
6560+
new_rpb->rpb_flags &= ~rpb_delta;
6561+
65606562
// If both descriptors share the same record, there cannot be any difference.
65616563
// This trick is used by VIO_writelock(), but can be a regular practice as well.
65626564
if (new_rpb->rpb_address == temp->rpb_address)

0 commit comments

Comments
 (0)