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

Fix the optimization that prevents writing freelist pages to the journal.

FossilOrigin-Name: 6aa9b26544cbd0b41115c5f127dcf9a286d17e2b
This commit is contained in:
drh
2016-12-14 10:30:12 +00:00
parent 79f20e96dc
commit 8a123d60a8
3 changed files with 9 additions and 9 deletions

View File

@@ -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->dbSize<pgno || noContent ){
if( pgno>pPager->mxPgno ){
rc = SQLITE_FULL;