diff options
author | drh <drh@noemail.net> | 2009-02-18 20:31:18 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-02-18 20:31:18 +0000 |
commit | 076d4661a68f67dbabc421eab124fe5908ebbeee (patch) | |
tree | cad35116431769390076862935c1dcc85370c42f /src | |
parent | 8b39db1c83771b4a0e052021a0a91a6dff574d9d (diff) | |
download | sqlite-076d4661a68f67dbabc421eab124fe5908ebbeee.tar.gz sqlite-076d4661a68f67dbabc421eab124fe5908ebbeee.zip |
Make sure the auto_vacuum=INCREMENTAL setting is preserved across a VACUUM.
Ticket #3663. (CVS 6304)
FossilOrigin-Name: ded04f12f41504e4a3ecd5164f0d4cbbde5e16f7
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/btree.c b/src/btree.c index c4bb5346a..5fb0306f4 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.565 2009/02/04 01:49:30 shane Exp $ +** $Id: btree.c,v 1.566 2009/02/18 20:31:18 drh Exp $ ** ** This file implements a external (disk-based) database using BTrees. ** See the header comment on "btreeInt.h" for additional information. @@ -1774,13 +1774,14 @@ int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){ #else BtShared *pBt = p->pBt; int rc = SQLITE_OK; - u8 av = autoVacuum ?1:0; + u8 av = (u8)autoVacuum; sqlite3BtreeEnter(p); - if( pBt->pageSizeFixed && av!=pBt->autoVacuum ){ + if( pBt->pageSizeFixed && (av ?1:0)!=pBt->autoVacuum ){ rc = SQLITE_READONLY; }else{ - pBt->autoVacuum = av; + pBt->autoVacuum = av ?1:0; + pBt->incrVacuum = av==2 ?1:0; } sqlite3BtreeLeave(p); return rc; |