8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 16:03:02 +01:00
This commit is contained in:
dimitr 2008-05-14 09:21:01 +00:00
parent 2ce0379e10
commit f84ad12e33

View File

@ -725,17 +725,17 @@ pag* CCH_fetch(
*
**************************************/
SET_TDBB(tdbb);
Database* dbb = tdbb->getDatabase();
if (window->win_page == HEADER_PAGE_NUMBER)
tdbb->getDatabase()->dbb_backup_manager->lock_shared_database(tdbb, true);
dbb->dbb_backup_manager->lock_shared_database(tdbb, true);
CCH_TRACE(("FETCH PAGE=%d", window->win_page));
// FETCH_LOCK will return 0, 1, -1 or -2
const SSHORT fetch_lock_return =
CCH_FETCH_LOCK(tdbb, window, lock_type, LCK_WAIT, latch_wait,
page_type);
CCH_FETCH_LOCK(tdbb, window, lock_type, LCK_WAIT, latch_wait, page_type);
if (fetch_lock_return == 1)
{
@ -744,7 +744,7 @@ pag* CCH_fetch(
}
else if (fetch_lock_return == -2 || fetch_lock_return == -1) {
if (window->win_page == HEADER_PAGE_NUMBER)
tdbb->getDatabase()->dbb_backup_manager->unlock_shared_database(tdbb);
dbb->dbb_backup_manager->unlock_shared_database(tdbb);
return NULL; /* latch or lock timeout */
}