8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:03:03 +01:00

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

This commit is contained in:
hvlad 2018-01-09 17:52:35 +02:00
parent 66d9f43a39
commit dc2a7e5708

View File

@ -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;
}