Skip to content

Commit 7bec06f

Browse files
committed
Do not try to delete a head record in delete_version_chain() when its rpb_page is 0
This may fix #7867.
1 parent 31f7879 commit 7bec06f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/jrd/vio.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -2056,6 +2056,12 @@ static void delete_version_chain(thread_db* tdbb, record_param* rpb, bool delete
20562056

20572057
ULONG prior_page = 0;
20582058

2059+
// Seems like it's possible to get rpb->rpb_page == 0 and
2060+
// delete_head == true from VIO_intermediate_gc. So set
2061+
// delete_head to false to avoid an error on DPM_fetch below.
2062+
if (!rpb->rpb_page)
2063+
delete_head = false;
2064+
20592065
// Note that the page number of the oldest version in the chain should
20602066
// be stored in rpb->rpb_page before exiting this function because
20612067
// VIO_intermediate_gc will use it as a prior page number.

0 commit comments

Comments
 (0)