1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix a recently introduced problem in "permutations.test autovacuum_crash". (CVS 6120)

FossilOrigin-Name: 2cdbb468ed81d35a7e1a580683864de60e103083
This commit is contained in:
danielk1977
2009-01-06 15:20:58 +00:00
parent 04df18dce8
commit f9bce3c54d
3 changed files with 11 additions and 10 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.531 2009/01/06 14:34:35 danielk1977 Exp $
** @(#) $Id: pager.c,v 1.532 2009/01/06 15:20:58 danielk1977 Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -2580,7 +2580,7 @@ static int subjournalPage(PgHdr *pPg){
i64 offset = pPager->stmtNRec*(4+pPager->pageSize);
char *pData2 = CODEC2(pPager, pData, pPg->pgno, 7);
PAGERTRACE3("STMT-JOURNAL %d page %d @ %d\n", PAGERID(pPager), pPg->pgno);
PAGERTRACE3("STMT-JOURNAL %d page %d\n", PAGERID(pPager), pPg->pgno);
assert( pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize );
rc = write32bits(pPager->sjfd, offset, pPg->pgno);
@@ -3860,6 +3860,7 @@ int sqlite3PagerCommitPhaseOne(
Pgno i;
Pgno iSkip = PAGER_MJ_PGNO(pPager);
Pgno dbSize = pPager->dbSize;
pPager->dbSize = pPager->dbOrigSize;
for( i=pPager->dbSize+1; i<=pPager->dbOrigSize; i++ ){
if( !sqlite3BitvecTest(pPager->pInJournal, i) && i!=iSkip ){
rc = sqlite3PagerGet(pPager, i, &pPg);