-C Append\sthe\sversion\snumber\sto\sthe\sdirectory\sname\sin\ssource\scode\starballs.\nTickets\s#793,\s#855,\sand\s#1055.\s(CVS\s2340)
-D 2005-02-15T16:15:10
+C Btree\schecks\sthe\sautovacuum\sflag\safter\slocking\sthe\sdatabase\sfile.\s(CVS\s2341)
+D 2005-02-15T16:23:02
F Makefile.in d928187101fa3d78426cf48ca30e39d0fb714e57
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/attach.c f78f76bc6a8e5e487ca53636e21ccba2484a9a61
F src/auth.c 18c5a0befe20f3a58a41e3ddd78f372faeeefe1f
-F src/btree.c 2432adf957c68e7243b198c174b0f316f9717844
+F src/btree.c 5c6e81855deec3d1eac5ae03e4c8db6c2595421f
F src/btree.h 2e2cc923224649337d7217df0dd32b06673ca180
F src/build.c 09333b6006d26d411dbaa918601be1054c09fff3
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P 9fd9d9fbeefcc76e7262f488f99ac11eaf58e88e
-R a2fd2a4c1c603dd3a01028da57d54289
+P 138577d0a5c41f3de4f9adc9ab6e312a65ff8888
+R f81718102e4042ffed922f8685264bda
U drh
-Z c969f213578d828c413220b331345b06
+Z ba532001e1e18d6f4d6553ba708c367b
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.247 2005/02/12 08:59:56 danielk1977 Exp $
+** $Id: btree.c,v 1.248 2005/02/15 16:23:02 drh Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
u8 minEmbedFrac; /* Minimum payload as % of total page size */
u8 minLeafFrac; /* Minimum leaf payload as % of total page size */
u8 pageSizeFixed; /* True if the page size can no longer be changed */
+#ifndef SQLITE_OMIT_AUTOVACUUM
+ u8 autoVacuum; /* True if database supports auto-vacuum */
+#endif
u16 pageSize; /* Total number of bytes on a page */
u16 psAligned; /* pageSize rounded up to a multiple of 8 */
u16 usableSize; /* Number of usable bytes on each page */
int minLocal; /* Minimum local payload in non-LEAFDATA tables */
int maxLeaf; /* Maximum local payload in a LEAFDATA table */
int minLeaf; /* Minimum local payload in a LEAFDATA table */
-#ifndef SQLITE_OMIT_AUTOVACUUM
- u8 autoVacuum; /* True if database supports auto-vacuum */
-#endif
};
typedef Btree Bt;
pBt->maxEmbedFrac = page1[21];
pBt->minEmbedFrac = page1[22];
pBt->minLeafFrac = page1[23];
+#ifndef SQLITE_OMIT_AUTOVACUUM
+ pBt->autoVacuum = (get4byte(&page1[36 + 4*4])?1:0);
+#endif
}
/* maxLocal is the maximum amount of payload to store locally for
}
#endif
-#if 0
-/*
-** Invalidate all cursors
-*/
-static void invalidateCursors(Btree *pBt){
- BtCursor *pCur;
- for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
- MemPage *pPage = pCur->pPage;
- if( pPage /* && !pPage->isInit */ ){
- pageIntegrity(pPage);
- releasePage(pPage);
- pCur->pPage = 0;
- pCur->isValid = 0;
- pCur->status = SQLITE_ABORT;
- }
- }
-}
-#endif
-
#ifdef SQLITE_TEST
/*
** Print debugging information about all cursors to standard output.