Compile and pass the quick regression tests with autovacuum disabled. (CVS 2073)

FossilOrigin-Name: 89b9026a5371f1c5589f04e3b69171ec1f605b7b
This commit is contained in:
drh
2004-11-06 00:02:48 +00:00
parent 4343fea20f
commit eee46cf35c
4 changed files with 25 additions and 15 deletions
+4 -2
View File
@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.211 2004/11/05 16:37:03 danielk1977 Exp $
** $Id: btree.c,v 1.212 2004/11/06 00:02:48 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -1192,9 +1192,11 @@ int sqlite3BtreeOpen(
pBt->maxEmbedFrac = 64; /* 25% */
pBt->minEmbedFrac = 32; /* 12.5% */
pBt->minLeafFrac = 32; /* 12.5% */
#ifndef SQLITE_OMIT_AUTOVACUUM
if( zFilename && strcmp(zFilename,":memory:") ){
pBt->autoVacuum = SQLITE_DEFAULT_AUTOVACUUM;
}
#endif
nReserve = 0;
}else{
nReserve = zDbHeader[20];
@@ -1313,7 +1315,7 @@ int sqlite3BtreeGetReserve(Btree *pBt){
*/
int sqlite3BtreeSetAutoVacuum(Btree *pBt, int autoVacuum){
#ifdef SQLITE_OMIT_AUTOVACUUM
return SQLITE_READONLY
return SQLITE_READONLY;
#else
if( pBt->pageSizeFixed ){
return SQLITE_READONLY;
+13 -5
View File
@@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.271 2004/11/05 23:46:15 drh Exp $
** $Id: build.c,v 1.272 2004/11/06 00:02:48 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1688,6 +1688,7 @@ static void destroyRootPage(Parse *pParse, int iTable, int iDb){
*/
static void destroyTable(Parse *pParse, Table *pTab){
#ifdef SQLITE_OMIT_AUTOVACUUM
Index *pIdx;
destroyRootPage(pParse, pTab->tnum, pTab->iDb);
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
destroyRootPage(pParse, pIdx->tnum, pIdx->iDb);
@@ -2817,10 +2818,17 @@ void reindexDatabases(Parse *pParse, CollSeq *pColl){
#endif
/*
** Generate code for a REINDEX command. If the argument is present it
** is the name of a collating sequence and all indices that use that
** collating sequence should be reindexed. If no argument is present,
** then rebuild all indices
** Generate code for the REINDEX command.
**
** REINDEX -- 1
** REINDEX <collation> -- 2
** REINDEX ?<database>.?<tablename> -- 3
** REINDEX ?<database>.?<indexname> -- 4
**
** Form 1 causes all indices in all attached databases to be rebuilt.
** Form 2 rebuilds all indices in all databases that use the named
** collating function. Forms 3 and 4 rebuild the named index or all
** indices associated with the named table.
*/
#ifndef SQLITE_OMIT_REINDEX
void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){