mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Changes to make sure tests work when SQLITE_DEFAULT_AUTOVACUUM is defined. (CVS 2219)
FossilOrigin-Name: 6237c294d1211d5848bafb1310574e2486a43757
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#***********************************************************************
|
||||
# This file runs all tests.
|
||||
#
|
||||
# $Id: all.test,v 1.27 2005/01/13 11:07:54 danielk1977 Exp $
|
||||
# $Id: all.test,v 1.28 2005/01/16 11:07:07 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -61,9 +61,13 @@ set EXCLUDE {
|
||||
# SQLITE_DEFAULT_AUTOVACUUM macro is defined to true (because they depend
|
||||
# on tables being allocated starting at page 2).
|
||||
#
|
||||
# Also corrupt.test doesn't work, because currently SQLite can't detect
|
||||
# corruption in pointer-map pages.
|
||||
#
|
||||
ifcapable default_autovacuum {
|
||||
lappend EXCLUDE btree2.test
|
||||
lappend EXCLUDE btree4.test
|
||||
lappend EXCLUDE corrupt.test
|
||||
}
|
||||
|
||||
for {set Counter 0} {$Counter<$COUNT && $nErr==0} {incr Counter} {
|
||||
|
@ -15,7 +15,7 @@
|
||||
# The tests in this file use special facilities that are only
|
||||
# available in the SQLite test fixture.
|
||||
#
|
||||
# $Id: ioerr.test,v 1.14 2005/01/16 09:06:34 danielk1977 Exp $
|
||||
# $Id: ioerr.test,v 1.15 2005/01/16 11:07:07 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -199,7 +199,7 @@ do_ioerr_test 3 -tclprep {
|
||||
UPDATE abc SET a = randstr(90,90);
|
||||
COMMIT;
|
||||
CREATE TABLE abc3(a);
|
||||
}
|
||||
}
|
||||
|
||||
# Test IO errors that can occur retrieving a record header that flows over
|
||||
# onto an overflow page.
|
||||
@ -217,8 +217,12 @@ do_ioerr_test 4 -tclprep {
|
||||
|
||||
# Test IO errors that may occur during a multi-file commit.
|
||||
#
|
||||
# Test 8 is excluded when auto-vacuum is enabled for the same reason
|
||||
# as in test cases ioerr-1.XXX
|
||||
# Tests 8 and 17 are excluded when auto-vacuum is enabled for the same
|
||||
# reason as in test cases ioerr-1.XXX
|
||||
set ex ""
|
||||
if {[string match [execsql {pragma auto_vacuum}] 1]} {
|
||||
set ex [list 8 17]
|
||||
}
|
||||
do_ioerr_test 5 -sqlprep {
|
||||
ATTACH 'test2.db' AS test2;
|
||||
} -sqlbody {
|
||||
@ -226,7 +230,7 @@ do_ioerr_test 5 -sqlprep {
|
||||
CREATE TABLE t1(a,b,c);
|
||||
CREATE TABLE test2.t2(a,b,c);
|
||||
COMMIT;
|
||||
} -exclude [expr [string match [execsql {pragma auto_vacuum}] 1] ? 8 : 0]
|
||||
} -exclude $ex
|
||||
|
||||
# Test IO errors when replaying two hot journals from a 2-file
|
||||
# transaction. This test only runs on UNIX.
|
||||
@ -252,7 +256,7 @@ if {$tcl_platform(platform)=="unix" && [file exists ./crashtest]} {
|
||||
|
||||
# Test handling of IO errors that occur while rolling back hot journal
|
||||
# files.
|
||||
do_ioerr_test 14 -tclprep {
|
||||
do_ioerr_test 7 -tclprep {
|
||||
db close
|
||||
sqlite3 db2 test2.db
|
||||
db2 eval {
|
||||
|
Reference in New Issue
Block a user