1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Work toward getting the new btree.c integrated with vdbe.c. (CVS 1345)

FossilOrigin-Name: bc5a2dafa1df74ba6403b4751ac1c33b0fee2884
This commit is contained in:
drh
2004-05-10 23:29:49 +00:00
parent 3644f0858d
commit f328bc80ce
10 changed files with 128 additions and 198 deletions

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach.test,v 1.13 2004/02/14 01:39:50 drh Exp $
# $Id: attach.test,v 1.14 2004/05/10 23:29:51 drh Exp $
#
set testdir [file dirname $argv0]
@ -23,6 +23,7 @@ for {set i 2} {$i<=15} {incr i} {
file delete -force test$i.db-journal
}
set btree_trace 1
do_test attach-1.1 {
execsql {
CREATE TABLE t1(a,b);

View File

@ -11,9 +11,8 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.30 2004/05/07 17:57:50 drh Exp $
# $Id: tester.tcl,v 1.31 2004/05/10 23:29:51 drh Exp $
if 0 {
# Make sure tclsqlite was compiled correctly. Abort now with an
# error message if not.
#
@ -63,8 +62,6 @@ sqlite db ./test.db
if {[info exists ::SETUP_SQL]} {
db eval $::SETUP_SQL
}
}
proc db {args} {}
# Abort early if this script has been run before.
#
@ -116,44 +113,6 @@ proc do_test {name cmd expected} {
}
}
# Invoke this procedure on a test that is probabilistic
# and might fail sometimes.
#
proc do_probtest {name cmd expected} {
global argv nProb nTest skip_test
if {$skip_test} {
set skip_test 0
return
}
if {[llength $argv]==0} {
set go 1
} else {
set go 0
foreach pattern $argv {
if {[string match $pattern $name]} {
set go 1
break
}
}
}
if {!$go} return
incr nTest
puts -nonewline $name...
flush stdout
if {[catch {uplevel #0 "$cmd;\n"} result]} {
puts "\nError: $result"
incr nErr
} elseif {[string compare $result $expected]} {
puts "\nExpected: \[$expected\]\n Got: \[$result\]"
puts "NOTE: The results of the previous test depend on system load"
puts "and processor speed. The test may sometimes fail even if the"
puts "library is working correctly."
incr nProb
} else {
puts " Ok"
}
}
# The procedure uses the special "sqlite_malloc_stat" command
# (which is only available if SQLite is compiled with -DMEMORY_DEBUG=1)
# to see how many malloc()s have not been free()ed. The number