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

Auto-vacuum bug: Don't set meta(3) to a pointer-map page number when deleting a table. (CVS 2066)

FossilOrigin-Name: 44a015b3a3bbecc4ec1e02bb371d3274e2b6edf3
This commit is contained in:
danielk1977
2004-11-05 12:58:25 +00:00
parent cb1a7eb0df
commit 87a6e7318f
4 changed files with 56 additions and 11 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.208 2004/11/05 12:27:02 danielk1977 Exp $
** $Id: btree.c,v 1.209 2004/11/05 12:58:25 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -4582,7 +4582,11 @@ int sqlite3BtreeDropTable(Btree *pBt, int iTable, int *piMoved){
*piMoved = maxRootPgno;
}
rc = sqlite3BtreeUpdateMeta(pBt, 4, maxRootPgno-1);
maxRootPgno--;
if( maxRootPgno==PTRMAP_PAGENO(pBt->pageSize, maxRootPgno) ){
maxRootPgno--;
}
rc = sqlite3BtreeUpdateMeta(pBt, 4, maxRootPgno);
}else{
rc = freePage(pPage);
releasePage(pPage);