mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Fix a bug involving balance_shallow() and the sqlite_master table. (CVS 2143)
FossilOrigin-Name: 557be3ff5b1c46a3f3836ea3a9d9dede5dc46998
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the CREATE TABLE statement.
|
||||
#
|
||||
# $Id: table.test,v 1.33 2004/11/10 11:55:15 danielk1977 Exp $
|
||||
# $Id: table.test,v 1.34 2004/11/23 09:06:56 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -627,5 +627,25 @@ do_test table-14.4 {
|
||||
set result [list $rc $msg]
|
||||
} {1 {database table is locked}}
|
||||
|
||||
# Create and drop 2000 tables. This is to check that the balance_shallow()
|
||||
# routine works correctly on the sqlite_master table. At one point it
|
||||
# contained a bug that would prevent the right-child pointer of the
|
||||
# child page from being copied to the root page.
|
||||
#
|
||||
do_test table-15.1 {
|
||||
execsql {BEGIN}
|
||||
for {set i 0} {$i<2000} {incr i} {
|
||||
execsql "CREATE TABLE tbl$i (a, b, c)"
|
||||
}
|
||||
execsql {COMMIT}
|
||||
} {}
|
||||
do_test table-15.2 {
|
||||
execsql {BEGIN}
|
||||
for {set i 0} {$i<2000} {incr i} {
|
||||
execsql "DROP TABLE tbl$i"
|
||||
}
|
||||
execsql {COMMIT}
|
||||
} {}
|
||||
|
||||
finish_test
|
||||
|
||||
|
Reference in New Issue
Block a user