From 2508339ea5cffbc36fd976aedaea5b63bb464913 Mon Sep 17 00:00:00 2001 From: Ilya Eremin Date: Wed, 5 Jul 2023 14:41:25 +0300 Subject: [PATCH] If rpb_incomplete flag is cleared, clear rpb_large flag as well --- src/jrd/dpm.epp | 6 ++++++ src/jrd/vio.cpp | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jrd/dpm.epp b/src/jrd/dpm.epp index 0b3cf07497..557b19b444 100644 --- a/src/jrd/dpm.epp +++ b/src/jrd/dpm.epp @@ -2312,6 +2312,8 @@ void DPM_update( thread_db* tdbb, record_param* rpb, PageStack* stack, const jrd Database* dbb = tdbb->getDatabase(); CHECK_DBB(dbb); + rpb->rpb_flags &= ~(rpb_fragment | rpb_incomplete | rpb_large | rpb_chained | rpb_gc_active | rpb_long_tranum); + #ifdef VIO_DEBUG jrd_rel* relation = rpb->rpb_relation; VIO_trace(DEBUG_WRITES, @@ -2581,6 +2583,7 @@ static void delete_tail(thread_db* tdbb, rhdf* header, const USHORT page_space, { USHORT flags = header->rhdf_flags; ULONG page_number = header->rhdf_f_page; + fb_assert(flags & rhd_incomplete); while (flags & rhd_incomplete) { @@ -2597,7 +2600,10 @@ static void delete_tail(thread_db* tdbb, rhdf* header, const USHORT page_space, PAG_release_page(tdbb, window.win_page, ZERO_PAGE_NUMBER); } else + { + fb_assert(false); break; + } } return; } diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp index 1d6ff0db33..f07d96bb80 100644 --- a/src/jrd/vio.cpp +++ b/src/jrd/vio.cpp @@ -1093,8 +1093,6 @@ void VIO_backout(thread_db* tdbb, record_param* rpb, const jrd_tra* transaction) else { // There is cleanup to be done. Bring the old version forward first - - rpb->rpb_flags &= ~(rpb_fragment | rpb_incomplete | rpb_chained | rpb_gc_active | rpb_long_tranum); DPM_update(tdbb, rpb, 0, transaction); delete_tail(tdbb, &temp2, rpb->rpb_page); } @@ -6530,7 +6528,6 @@ static void replace_record(thread_db* tdbb, #endif record_param temp = *rpb; - rpb->rpb_flags &= ~(rpb_fragment | rpb_incomplete | rpb_chained | rpb_gc_active | rpb_long_tranum); DPM_update(tdbb, rpb, stack, transaction); delete_tail(tdbb, &temp, rpb->rpb_page);