-C Bring\sthe\sautoconf\sbased\sbuild\ssystem\sup\sto\sdate\swith\sthe\srecent\schanges.\s#2366,\s#2367\sand\s#2368.\s(CVS\s4022)
-D 2007-05-17T16:38:30
+C Change\sthe\sway\soverflow\spages\sare\sallocated\sfrom\sthe\sfree-list\sto\sincrease\sthe\schance\sthat\sthey\sare\sa\scontiguous\sblock.\sMuch\smore\scan\sstill\sbe\sdone.\s(CVS\s4023)
+D 2007-05-17T18:28:11
F Makefile.in a42354804b50c2708ce72cf79e4daa30f50191b5
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/analyze.c e8fcb1c35ace8418615eb18d9601f321ac86b2ec
F src/attach.c ba628db0c2b6a362f036d017bf1196cdfe4ebb37
F src/auth.c 5ea90bc93dfea46e9fe4bf531e14c7cd98219ecb
-F src/btree.c 911798b91bbad31a033ed501b95c76df8541874b
+F src/btree.c 9179039d9a023da986c168e276680fed9dcc57fd
F src/btree.h 1d527bf61ed176f980c34999d5793a0fd45dcf8c
F src/btreeInt.h f92c0577f49d961c0148b477a25647e8fd80eecf
F src/build.c 50992d92e131a9aa9aa6657fb1ddc13e176fd70c
F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5
F test/speed1.test 22e1b27af0683ed44dcd2f93ed817a9c3e65084a
F test/speed2.test 53177056baf6556dcbdcf032bbdfc41c1aa74ded
-F test/speed3.test 2c1947ad95b0d5cbd41a485c62402911ef9fd541
+F test/speed3.test 27a71b5cc83c1f23baf6d0ee52e2f195e3c415f2
F test/sqllimits1.test b15a5784e47199d68fa1182157ba7e790f467d9f
F test/subquery.test ae324ee928c5fb463a3ce08a8860d6e7f1ca5797
F test/subselect.test 974e87f8fc91c5f00dd565316d396a5a6c3106c4
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P f2ce727c4d798c666e95876a2b67e8a305d82e3a
-R 7b00490089c9a9acc3bbd9b31f5ea738
+P ae644bc7aad229f2d219ea20eb4774318feb3051
+R 269f6950d9247c5d127e8dd163a6acb5
U danielk1977
-Z 3e6e530a34bc48403e48b023fcadb804
+Z 028a3648b2f6bed3a2edcff1de5c489f
-ae644bc7aad229f2d219ea20eb4774318feb3051
\ No newline at end of file
+b7391892041eb72b0ebcbb7a9a6721ae3482dd80
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.382 2007/05/16 17:28:43 danielk1977 Exp $
+** $Id: btree.c,v 1.383 2007/05/17 18:28:11 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** See the header comment on "btreeInt.h" for additional information.
while( nPayload>0 ){
if( spaceLeft==0 ){
+ int isExact = 0;
#ifndef SQLITE_OMIT_AUTOVACUUM
Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */
+ if( pBt->autoVacuum ){
+ do{
+ pgnoOvfl++;
+ } while(
+ PTRMAP_ISPAGE(pBt, pgnoOvfl) || pgnoOvfl==PENDING_BYTE_PAGE(pBt)
+ );
+ if( pgnoOvfl>1 ){
+ /* isExact = 1; */
+ }
+ }
#endif
- rc = allocateBtreePage(pBt, &pOvfl, &pgnoOvfl, pgnoOvfl, 0);
+ rc = allocateBtreePage(pBt, &pOvfl, &pgnoOvfl, pgnoOvfl, isExact);
#ifndef SQLITE_OMIT_AUTOVACUUM
/* If the database supports auto-vacuum, and the second or subsequent
** overflow page is being allocated, add an entry to the pointer-map
# focus of this script is testing that the overflow-page related
# enhancements added after version 3.3.17 speed things up.
#
-# $Id: speed3.test,v 1.1 2007/05/17 14:45:13 danielk1977 Exp $
+# $Id: speed3.test,v 1.2 2007/05/17 18:28:11 danielk1977 Exp $
#
#---------------------------------------------------------------------
puts "Normal : Read $stats2(read), wrote $stats2(write)"
}
+proc overflow_report {db} {
+ set bt [btree_from_db db]
+ set csr [btree_cursor $bt 3 0]
+
+ for {btree_first $csr} {![btree_eof $csr]} {btree_next $csr} {
+ puts "[btree_ovfl_info $bt $csr]"
+ }
+
+ btree_close_cursor $csr
+
+}
+
proc reset_db {} {
db close
sqlite3 db test.db
# Delete all content in a table, one row at a time.
#
#io_log db
+#overflow_report db
reset_db
speed_trial speed3-1.incrvacuum $::NROW row {DELETE FROM main.t1 WHERE 1}
speed_trial speed3-1.normal $::NROW row {DELETE FROM aux.t1 WHERE 1}
# Select the "C" column (located at the far end of the overflow
# chain) from each table row.
#
-db eval {PRAGMA incremental_vacuum(500000)}
+#db eval {PRAGMA incremental_vacuum(500000)}
populate_t1 db
+#overflow_report db
reset_db
speed_trial speed3-2.incrvacuum $::NROW row {SELECT c FROM main.t1}
speed_trial speed3-2.normal $::NROW row {SELECT c FROM aux.t1}