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

Fix a problem causing the database to be truncated to the wrong size after an incremental-vacuum is performed on a database in full auto-vacuum mode. (CVS 5094)

FossilOrigin-Name: ed98df24a3362c2d20f52bb1ce679787b3ee408b
This commit is contained in:
danielk1977
2008-05-07 07:13:16 +00:00
parent 1e12d43b48
commit 0ba32df4f1
4 changed files with 32 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.455 2008/05/05 15:26:51 danielk1977 Exp $
** $Id: btree.c,v 1.456 2008/05/07 07:13:16 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
@@ -2321,7 +2321,7 @@ static int autoVacuumCommit(BtShared *pBt, Pgno *pnTrunc){
if( rc==SQLITE_DONE ){
assert(nFin==0 || pBt->nTrunc==0 || nFin<=pBt->nTrunc);
rc = SQLITE_OK;
if( pBt->nTrunc ){
if( pBt->nTrunc && nFin ){
rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
put4byte(&pBt->pPage1->aData[32], 0);
put4byte(&pBt->pPage1->aData[36], 0);