1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

First attempt at enhancing the "PRAGMA cache_spill" statement to accept a

cache threashold size.

FossilOrigin-Name: 549d42be0dac87dc04c3eeccfdc60615c3a6ad3f
This commit is contained in:
drh
2015-11-12 14:57:19 +00:00
parent 3d38cec99a
commit 9b0cf34f81
12 changed files with 257 additions and 140 deletions

View File

@@ -3392,12 +3392,21 @@ static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
}
/*
** Change the maximum number of in-memory pages that are allowed.
** Change the maximum number of in-memory pages that are allowed
** before attempting to recycle clean and unused pages.
*/
void sqlite3PagerSetCachesize(Pager *pPager, int mxPage){
sqlite3PcacheSetCachesize(pPager->pPCache, mxPage);
}
/*
** Change the maximum number of in-memory pages that are allowed
** before attempting to spill pages to journal.
*/
int sqlite3PagerSetSpillsize(Pager *pPager, int mxPage){
return sqlite3PcacheSetSpillsize(pPager->pPCache, mxPage);
}
/*
** Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap.
*/