1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Print a log message on each cache spill if compiled with

SQLITE_LOG_CACHE_SPILL.

FossilOrigin-Name: 5f15579f8ca747f0fa0a7867ceffc8c7b8f904e6
This commit is contained in:
drh
2011-05-28 15:53:07 +00:00
parent 305ebab7cc
commit c97125eb72
3 changed files with 14 additions and 7 deletions

View File

@@ -253,6 +253,13 @@ int sqlite3PcacheFetch(
}
if( pPg ){
int rc;
#ifdef SQLITE_LOG_CACHE_SPILL
sqlite3_log(SQLITE_FULL,
"spill page %d making room for %d - cache used: %d/%d",
pPg->pgno, pgno,
sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache),
pCache->nMax);
#endif
rc = pCache->xStress(pCache->pStress, pPg);
if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
return rc;