1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fixes to the test suite (no code changes) so that quick.test runs with OMIT_ATTACH builds. #2706. (CVS 4480)

FossilOrigin-Name: 07c00fffe50e8380748f7ae02328531a75d64610
This commit is contained in:
danielk1977
2007-10-09 08:29:32 +00:00
parent 0cd1ea5e44
commit 5a8f9374ab
39 changed files with 1253 additions and 1158 deletions

View File

@ -13,7 +13,7 @@
# This file tests the various conditions under which an SQLITE_SCHEMA
# error should be returned.
#
# $Id: schema.test,v 1.7 2007/08/13 15:28:35 danielk1977 Exp $
# $Id: schema.test,v 1.8 2007/10/09 08:29:33 danielk1977 Exp $
#---------------------------------------------------------------------
# When any of the following types of SQL statements or actions are
@ -141,26 +141,28 @@ do_test schema-4.4 {
# Tests 5.1 to 5.4 check that prepared statements are invalidated when
# a database is DETACHed (but not when one is ATTACHed).
#
do_test schema-5.1 {
set sql {SELECT * FROM abc;}
set ::STMT [sqlite3_prepare $::DB $sql -1 TAIL]
execsql {
ATTACH 'test2.db' AS aux;
}
sqlite3_step $::STMT
} {SQLITE_DONE}
do_test schema-5.2 {
sqlite3_reset $::STMT
} {SQLITE_OK}
do_test schema-5.3 {
execsql {
DETACH aux;
}
sqlite3_step $::STMT
} {SQLITE_ERROR}
do_test schema-5.4 {
sqlite3_finalize $::STMT
} {SQLITE_SCHEMA}
ifcapable attach {
do_test schema-5.1 {
set sql {SELECT * FROM abc;}
set ::STMT [sqlite3_prepare $::DB $sql -1 TAIL]
execsql {
ATTACH 'test2.db' AS aux;
}
sqlite3_step $::STMT
} {SQLITE_DONE}
do_test schema-5.2 {
sqlite3_reset $::STMT
} {SQLITE_OK}
do_test schema-5.3 {
execsql {
DETACH aux;
}
sqlite3_step $::STMT
} {SQLITE_ERROR}
do_test schema-5.4 {
sqlite3_finalize $::STMT
} {SQLITE_SCHEMA}
}
#---------------------------------------------------------------------
# Tests 6.* check that prepared statements are invalidated when