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

Additional fix for CORE-5329. Once more thanks to Dmitry

This commit is contained in:
hvlad 2016-08-16 17:22:29 +03:00
parent 896c742941
commit 610594a525

View File

@ -744,6 +744,7 @@ static ULONG ensureDiskSpace(thread_db* tdbb, WIN* pip_window, const PageNumber
PageManager& pageMgr = dbb->dbb_page_manager;
PageSpace* pageSpace = pageMgr.findPageSpace(pageNum.getPageSpaceID());
ULONG newUsed = pipUsed;
const ULONG sequence = pageNum.getPageNum() / pageMgr.pagesPerPIP;
const ULONG relative_bit = pageNum.getPageNum() - sequence * pageMgr.pagesPerPIP;
@ -788,7 +789,7 @@ static ULONG ensureDiskSpace(thread_db* tdbb, WIN* pip_window, const PageNumber
if (init_pages)
{
pipUsed += init_pages;
newUsed += init_pages;
}
else
{
@ -815,7 +816,7 @@ static ULONG ensureDiskSpace(thread_db* tdbb, WIN* pip_window, const PageNumber
throw;
}
pipUsed = relative_bit + 1;
newUsed = relative_bit + 1;
}
}
@ -829,7 +830,7 @@ static ULONG ensureDiskSpace(thread_db* tdbb, WIN* pip_window, const PageNumber
pageSpace->extend(tdbb, initialized + next_init_pages, false);
}
return pipUsed;
return newUsed;
}