aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-05-07 07:13:16 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-05-07 07:13:16 +0000
commit0ba32df4f1beff59504bdf1f0485956b7c0b90dd (patch)
treef0b2d3dacd513ac23787821c29fbbca4516d779e /src
parent1e12d43b481cc2fb654cebd7bc43d57aa6c94f56 (diff)
downloadsqlite-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.c4
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);