diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-05-07 07:13:16 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-05-07 07:13:16 +0000 |
commit | 0ba32df4f1beff59504bdf1f0485956b7c0b90dd (patch) | |
tree | f0b2d3dacd513ac23787821c29fbbca4516d779e /src | |
parent | 1e12d43b481cc2fb654cebd7bc43d57aa6c94f56 (diff) | |
download | sqlite-0ba32df4f1beff59504bdf1f0485956b7c0b90dd.tar.gz sqlite-0ba32df4f1beff59504bdf1f0485956b7c0b90dd.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btree.c b/src/btree.c index c4d972f96..f61be9626 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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); |