From: drh Date: Wed, 14 Dec 2016 10:30:12 +0000 (+0000) Subject: Fix the optimization that prevents writing freelist pages to the journal. X-Git-Tag: version-3.16.0~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a123d60a85992b329db24791c4f1b865279ff3c;p=thirdparty%2Fsqlite.git Fix the optimization that prevents writing freelist pages to the journal. FossilOrigin-Name: 6aa9b26544cbd0b41115c5f127dcf9a286d17e2b --- diff --git a/manifest b/manifest index e64156d9ec..2934b2c6ef 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sthe\scommand-line\sshell,\sin\sthe\soutput\sof\sthe\s".dump",\s".schema",\sand\n".fullschema"\scommands,\sconvert\sCREATE\sTABLE\sstatements\sthat\sappear\sto\scome\nfrom\sshadow\stables\sinto\sCREATE\sTABLE\sIF\sNOT\sEXISTS\sstatements. -D 2016-12-13T23:22:39.714 +C Fix\sthe\soptimization\sthat\sprevents\swriting\sfreelist\spages\sto\sthe\sjournal. +D 2016-12-14T10:30:12.405 F Makefile.in 7639c6a09da11a9c7c6f2630fc981ee588d1072d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc b8ca53350ae545e3562403d5da2a69cec79308da @@ -375,7 +375,7 @@ F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586 F src/os_unix.c 30e2c43e4955db990e5b5a81e901f8aa74cc8820 F src/os_win.c cf90abd4e50d9f56d2c20ce8e005aff55d7bd8e9 F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a -F src/pager.c c3ba8e69388d974017004aa3fd3511e5bbadbba0 +F src/pager.c 81fe2bb847df537694ec39e28e8b3dc221c64a7d F src/pager.h d1e944291030351f362a0a7da9b5c3e34e603e39 F src/parse.y 29153738a7322054359320eb00b5a4cd44389f20 F src/pcache.c 51070ec9b8251bbf9c6ea3d35fd96a458752929e @@ -1536,7 +1536,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P ed2c9f3738c96d8e3dbece7ccb721cb1a8ae8fac -R 064921518747d6f1187652c989ffbe09 +P c7021960f5c070fb5c9db9e41b4000d3dc065f42 +R 29a5ab173feb9dcb847f7e97678fc3f9 U drh -Z 06643ca029a5c5cdb028f91458ca4784 +Z a1e79a7a1334afe1605804fa02a1d4f0 diff --git a/manifest.uuid b/manifest.uuid index 136940b880..e16b607041 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c7021960f5c070fb5c9db9e41b4000d3dc065f42 \ No newline at end of file +6aa9b26544cbd0b41115c5f127dcf9a286d17e2b \ No newline at end of file diff --git a/src/pager.c b/src/pager.c index cd2ded4e3f..5bcb9247e8 100644 --- a/src/pager.c +++ b/src/pager.c @@ -5386,7 +5386,8 @@ static int getPageNormal( assert( pPg->pgno==pgno ); assert( pPg->pPager==pPager || pPg->pPager==0 ); - if( pPg->pPager ){ + noContent = (flags & PAGER_GET_NOCONTENT)!=0; + if( pPg->pPager && !noContent ){ /* In this case the pcache already contains an initialized copy of ** the page. Return without further ado. */ assert( pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager) ); @@ -5409,7 +5410,6 @@ static int getPageNormal( pPg->pPager = pPager; assert( !isOpen(pPager->fd) || !MEMDB ); - noContent = (flags & PAGER_GET_NOCONTENT)!=0; if( !isOpen(pPager->fd) || pPager->dbSizepPager->mxPgno ){ rc = SQLITE_FULL;