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

Fix an auto-vacuum problem with the PENDING_BYTE page. Also link the Tcl

variable sqlite_pending_byte to the internal pending-byte location when in test mode. (CVS 2700)

FossilOrigin-Name: 9115e0621d1fdc5a89a0288b87c0a4ce1e4b50c6
This commit is contained in:
danielk1977
2005-09-16 09:52:29 +00:00
parent a2833a0cf6
commit fd5f5b65b4
6 changed files with 34 additions and 18 deletions

View File

@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the SELECT statement.
#
# $Id: autovacuum.test,v 1.18 2005/09/08 10:37:01 drh Exp $
# $Id: autovacuum.test,v 1.19 2005/09/16 09:52:30 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -279,12 +279,16 @@ do_test autovacuum-2.4.4 {
"
} {}
set root_page_list [list]
set pending_byte_page [expr ($::sqlite_pending_byte / 1024) + 1]
for {set i 3} {$i<=532} {incr i} {
# 207 and 412 are pointer-map pages.
if { $i!=207 && $i!=412 } {
if { $i!=207 && $i!=412 && $i != $pending_byte_page} {
lappend root_page_list $i
}
}
if {$i >= $pending_byte_page} {
lappend root_page_list $i
}
do_test autovacuum-2.4.5 {
for {set i 11} {$i<=530} {incr i} {
execsql "CREATE TABLE av$i (x)"
@@ -298,7 +302,7 @@ do_test autovacuum-2.4.5 {
do_test autovacuum-2.4.6 {
execsql COMMIT;
file_pages
} 561
} [expr 561 + (($i >= $pending_byte_page)?1:0)]
integrity_check autovacuum-2.4.6
do_test autovacuum-2.4.7 {
execsql BEGIN