From dc2a7e57087864e3ea800ba9023352e2f4505ec8 Mon Sep 17 00:00:00 2001 From: hvlad Date: Tue, 9 Jan 2018 17:52:35 +0200 Subject: [PATCH] Improvement CORE-5703 : When database validation fixes "orphan page" errors it also should adjust "lowest free page" marker (pip_min) on corresponding PIP, if necessary --- src/jrd/validation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/jrd/validation.cpp b/src/jrd/validation.cpp index f6115e3e33..c459dfb6ed 100644 --- a/src/jrd/validation.cpp +++ b/src/jrd/validation.cpp @@ -1370,6 +1370,13 @@ void Validation::garbage_collect() CCH_MARK(vdr_tdbb, &window); p[-1] |= 1 << (number & 7); vdr_fixed++; + + const ULONG bit = number - sequence * pageSpaceMgr.pagesPerPIP; + if (page->pip_min > bit) + page->pip_min = bit; + + if (p[-1] == 0xFF && page->pip_extent > bit) + page->pip_extent = bit & ((ULONG)~7); } DEBUG; }