-C Fix\san\sauto-vacuum\sbug\sthat\soccurs\swhen\sa\sbtree\scell\sis\spromoted\sto\sthe\sparent\spage\sduring\sa\sdelete.\s(CVS\s2043)
-D 2004-11-03T03:01:17
+C Auto-vacuum\sbugfix:\sDo\snot\sattempt\sto\smove\sa\spointer-map\spage\sduring\sauto-vacuum.\s(CVS\s2044)
+D 2004-11-03T03:52:37
F Makefile.in 9e90c685d69f09039015a6b1f3b0a48e9738c9e5
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/attach.c e49d09dad9f5f9fb10b4b0c1be5a70ae4c45e689
F src/auth.c 3b81f2a42f48a62c2c9c9b0eda31a157c681edea
-F src/btree.c 2f7cfc724b2c34a046cee11ca12582d786e50308
+F src/btree.c e243f8927f827337ecd316da9f4a15790b7b33cf
F src/btree.h 94dfec0a1722d33359b23e7e310f2b64ffedf029
F src/build.c bb896c5f85ab749d17ae5d730235134c12c08033
F src/date.c 34bdb0082db7ec2a83ef00063f7b44e61ee19dad
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
-P a2c9c45c803350f45911a72eb61efa9c3089f8ca
-R c5211669f5d9e58d9ee4a32f7514f865
+P b7d953e1195897de4869ec241a65e8a3d1320efb
+R e185cf7676cc794eee9060c09350688b
U danielk1977
-Z a5ce17377bb4e63f27099031250fb3aa
+Z 0648ce34f782ce635735be96e8684487
-b7d953e1195897de4869ec241a65e8a3d1320efb
\ No newline at end of file
+bd50fbb5fecd1829c87e8ca72c458c71f590274b
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.200 2004/11/03 03:01:17 danielk1977 Exp $
+** $Id: btree.c,v 1.201 2004/11/03 03:52:37 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
nFreeList = get4byte(&pBt->pPage1->aData[36]);
if( nFreeList==0 ) return SQLITE_OK;
+ /* TODO: This does not calculate finDbSize correctly for the case where
+ ** pointer-map pages must be deallocated.
+ */
origDbSize = sqlite3pager_pagecount(pPager);
finDbSize = origDbSize - nFreeList;
TRACE(("AUTOVACUUM: Begin (db size %d->%d)\n", origDbSize, finDbSize));
if( rc!=SQLITE_OK ) goto autovacuum_out;
assert( eType!=PTRMAP_ROOTPAGE );
- /* If iDbPage is already on the free-list, do not swap it. */
- if( eType==PTRMAP_FREEPAGE ){
+ /* If iDbPage is a free or pointer map page, do not swap it. */
+ if( eType==PTRMAP_FREEPAGE ||
+ iDbPage==PTRMAP_PAGENO(pBt->pageSize, iDbPage) ){
continue;
}
rc = getPage(pBt, iDbPage, &pDbMemPage);