Skip to content

Commit 9d22186

Browse files
committed
Correct the fix for #7867 and update the comment
1 parent cf98c6e commit 9d22186

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/jrd/vio.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,13 +2054,14 @@ static void delete_version_chain(thread_db* tdbb, record_param* rpb, bool delete
20542054
rpb->rpb_f_page, rpb->rpb_f_line);
20552055
#endif
20562056

2057-
ULONG prior_page = 0;
2058-
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.
2057+
// It's possible to get rpb_page == 0 from VIO_intermediate_gc via
2058+
// staying_chain_rpb. This case happens there when the staying record
2059+
// stack has 1 item at the moment this rpb is created. So return to
2060+
// avoid an error on DPM_fetch below.
20622061
if (!rpb->rpb_page)
2063-
delete_head = false;
2062+
return;
2063+
2064+
ULONG prior_page = 0;
20642065

20652066
// Note that the page number of the oldest version in the chain should
20662067
// be stored in rpb->rpb_page before exiting this function because

0 commit comments

Comments
 (0)