aboutsummaryrefslogtreecommitdiff
path: root/src/pager.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-11-12 14:57:19 +0000
committerdrh <drh@noemail.net>2015-11-12 14:57:19 +0000
commit9b0cf34f813b7d542f593b59e6466f94d7cc11e2 (patch)
treea581a429322c80555a7ff7de5a036efe917ef550 /src/pager.c
parent3d38cec99a5e635b2a69ca0ca8adfdeb99b96006 (diff)
downloadsqlite-9b0cf34f813b7d542f593b59e6466f94d7cc11e2.tar.gz
sqlite-9b0cf34f813b7d542f593b59e6466f94d7cc11e2.zip
First attempt at enhancing the "PRAGMA cache_spill" statement to accept a
cache threashold size. FossilOrigin-Name: 549d42be0dac87dc04c3eeccfdc60615c3a6ad3f
Diffstat (limited to 'src/pager.c')
-rw-r--r--src/pager.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pager.c b/src/pager.c
index b537e9e93..f633a7792 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -3392,13 +3392,22 @@ 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.
*/
static void pagerFixMaplimit(Pager *pPager){