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

Fixed incorrect accounting re. number of fetches.

This commit is contained in:
dimitr 2013-08-15 11:54:56 +00:00
parent f94bf3d32d
commit d2fa09942e

View File

@ -3645,7 +3645,6 @@ static LatchState latch_buffer(thread_db* tdbb, Sync &bcbSync, BufferDesc *bdb,
if (bdb->bdb_page == page)
{
//bdb->bdb_flags &= ~(BDB_faked | BDB_prefetch);
tdbb->bumpStats(RuntimeStatistics::PAGE_FETCHES);
return lsOk;
}
bdb->release(tdbb, false);
@ -3698,6 +3697,7 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, SyncType s
{
const LatchState ret = latch_buffer(tdbb, bcbSync, bdb, page, syncType, wait);
if (ret == lsOk) {
tdbb->bumpStats(RuntimeStatistics::PAGE_FETCHES);
return bdb;
}
if (ret == lsTimeout) {
@ -3724,6 +3724,7 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, SyncType s
{
const LatchState ret = latch_buffer(tdbb, bcbSync, bdb, page, syncType, wait);
if (ret == lsOk) {
tdbb->bumpStats(RuntimeStatistics::PAGE_FETCHES);
return bdb;
}
if (ret == lsTimeout) {
@ -3755,6 +3756,7 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, SyncType s
}
if (bdb->bdb_flags & BDB_db_dirty)
{
//tdbb->bumpStats(RuntimeStatistics::PAGE_FETCHES); shouldn't it be here?
return bdb;
}
if (!--walk)
@ -3988,6 +3990,7 @@ static BufferDesc* get_buffer(thread_db* tdbb, const PageNumber page, SyncType s
else
PAGE_LOCK_RELEASE(tdbb, bcb, bdb->bdb_lock);
tdbb->bumpStats(RuntimeStatistics::PAGE_FETCHES);
return bdb;
}