diff options
author | drh <drh@noemail.net> | 2015-09-24 14:26:51 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-09-24 14:26:51 +0000 |
commit | 9ec0efd946b8015f8b3ba3b726bc39f0b15d306c (patch) | |
tree | b4764dfa9ca1b2d064f80f3d13056f2b5bbeba61 /src/pager.c | |
parent | 438b881540c83370029c73c8a1d7eba78979c491 (diff) | |
parent | 22c733da644bcf8d614b7caf058c7a2b51286ab8 (diff) | |
download | sqlite-9ec0efd946b8015f8b3ba3b726bc39f0b15d306c.tar.gz sqlite-9ec0efd946b8015f8b3ba3b726bc39f0b15d306c.zip |
Merge all the latest trunk enhancements into the sessions branch.
FossilOrigin-Name: c91065f8edb1e54076791716fc20d3fcfe3070dc
Diffstat (limited to 'src/pager.c')
-rw-r--r-- | src/pager.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pager.c b/src/pager.c index 2f7c330d6..399070af0 100644 --- a/src/pager.c +++ b/src/pager.c @@ -2116,6 +2116,20 @@ static void pagerReportSize(Pager *pPager){ # define pagerReportSize(X) /* No-op if we do not support a codec */ #endif +#ifdef SQLITE_HAS_CODEC +/* +** Make sure the number of reserved bits is the same in the destination +** pager as it is in the source. This comes up when a VACUUM changes the +** number of reserved bits to the "optimal" amount. +*/ +void sqlite3PagerAlignReserve(Pager *pDest, Pager *pSrc){ + if( pDest->nReserve!=pSrc->nReserve ){ + pDest->nReserve = pSrc->nReserve; + pagerReportSize(pDest); + } +} +#endif + /* ** Read a single page from either the journal file (if isMainJrnl==1) or ** from the sub-journal (if isMainJrnl==0) and playback that page. |