Have tests pass when SQLITE_OMIT_SCHEMA_PRAGMAS is defined. (CVS 2144)

FossilOrigin-Name: 6ccb589bd94fc7d33e07caa39e011c3628563e9b
This commit is contained in:
danielk1977 2004-11-23 10:13:03 +00:00
parent ae82558bd0
commit 27188fb5f0
7 changed files with 45 additions and 20 deletions

View File

@ -1,5 +1,5 @@
C Fix\sa\sbug\sinvolving\sbalance_shallow()\sand\sthe\ssqlite_master\stable.\s(CVS\s2143)
D 2004-11-23T09:06:56
C Have\stests\spass\swhen\sSQLITE_OMIT_SCHEMA_PRAGMAS\sis\sdefined.\s(CVS\s2144)
D 2004-11-23T10:13:03
F Makefile.in 8291610f5839939a5fbff4dbbf85adb0fe1ac37f
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
@ -85,10 +85,10 @@ F src/vdbemem.c 5876c8abf4374fef671f4fd8dc333ef3fc95a2f0
F src/where.c f9d3b6f2243a0eb9065fa4c465fe0831a64b7db7
F test/all.test 929bfa932b55e75c96fe2203f7650ba451c1862c
F test/alter.test 95c57a4f461fa81293e0dccef7f83889aadb169a
F test/attach.test a71117bab079c8a3a955e2d0270a76f9cb445935
F test/attach2.test 399128a7b3b209a339a8dbf53ca2ed42eb982d1a
F test/attach.test f39069efd4394422798f249df9a31489aa941ee1
F test/attach2.test eeb987770f4dbe68bd29afdbc2e8cff0142e6eb5
F test/attach3.test c05c70b933afbde0901dab9da3e66ee842c09f38
F test/auth.test 050fe904ab1b2654b0dbb776035833d64bcde3da
F test/auth.test ecc43fc5605ec562ef73874aa803d18c12d20fa6
F test/autoinc.test c071e51ff167b8e889212273588d9cca71845b70
F test/autovacuum.test a4e8da39a6268378c4f9fc17fe2df1d5be16d631
F test/autovacuum_crash.test 2dca85cbcc497098e45e8847c86407eb3554f3d4
@ -160,7 +160,7 @@ F test/pager.test 394455707a079804e8a4e431d12edce831a065f0
F test/pager2.test 49c0f57c7da0b060f0486b85fdd074025caa694e
F test/pager3.test 647f696a9cf7409df00a1e0047c2eb55585a1b85
F test/pagesize.test 6f94b70ed9645dbe6314b627ae765c5dec8036d9
F test/pragma.test ab309fb98bf4fe49481b9661354376cc56067f7e
F test/pragma.test 5b0c3224170832784386e60140d923f099630ee1
F test/printf.test 92ba4c510b4fc61120ffa4a01820446ed917ae57
F test/progress.test 5ddba78cb6011fba36093973cfb3ac473b8fb96a x
F test/quick.test 91e5b8ae6663dc9e3e754b271f0384f0cae706e6
@ -179,7 +179,7 @@ F test/sort.test 87882e6c72a75d45e98a1c802c1ded0eac557d85
F test/subselect.test ff3850d0aab1443dafa4ecbdab1d01e58e7b366d
F test/table.test 9e0d406073cb5752e25cee36a48a1c349f634b66
F test/tableapi.test b21ab097e87a5484bb61029e69e1a4e5c5e65ede
F test/tclsqlite.test 5e262df81a638a058536fb6d6666f316843ac7b2
F test/tclsqlite.test 861464afab6e28a0f3b236984cb24b0a7a20e508
F test/temptable.test 63a16e3ad19adf073cfbcdf7624c92ac5236522c
F test/tester.tcl e7ebedf60c8ebbb0a9af4950981babfbb80cc9a7
F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35
@ -261,7 +261,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c
P 8b61d1ae1ca469b80f2b344d550c3b363448b193
R 3b5021df085c0b0cbca8f147556371d1
P 557be3ff5b1c46a3f3836ea3a9d9dede5dc46998
R 795bf0d67acc367f1399bb179f72bd24
U danielk1977
Z bf1645a7f2a7f97f2983b5f556ee8c1a
Z 6114e34e7feb3954d6ddf0262d880fc7

View File

@ -1 +1 @@
557be3ff5b1c46a3f3836ea3a9d9dede5dc46998
6ccb589bd94fc7d33e07caa39e011c3628563e9b

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.31 2004/11/22 13:35:42 danielk1977 Exp $
# $Id: attach.test,v 1.32 2004/11/23 10:13:03 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@ -102,9 +102,11 @@ proc db_list {db} {
}
return $list
}
ifcapable schema_pragmas {
do_test attach-1.11b {
db_list db
} {0 main 2 db2 3 db3 4 db4 5 db5 6 db6 7 db7 8 db8 9 db9}
} ;# ifcapable schema_pragmas
do_test attach-1.12 {
catchsql {
ATTACH 'test.db' as db2;
@ -150,8 +152,12 @@ do_test attach-1.20.1 {
execsql {
DETACH db5;
}
} {}
ifcapable schema_pragmas {
do_test attach-1.20.2 {
db_list db
} {0 main 2 db2 3 db3 4 db4 5 db6 6 db7 7 db8 8 db9 9 db10 10 db11}
} ;# ifcapable schema_pragmas
integrity_check attach-1.20.2
execsql {select * from sqlite_temp_master}
do_test attach-1.21 {
@ -202,9 +208,11 @@ do_test attach-1.28 {
DETACH db2;
}
} {0 {}}
ifcapable schema_pragmas {
do_test attach-1.29 {
db_list db
} {0 main 1 temp}
} ;# ifcapable schema_pragmas
ifcapable {trigger} { # Only do the following tests if triggers are enabled
do_test attach-2.1 {
@ -249,9 +257,11 @@ do_test attach-2.7 {
SELECT type, name, tbl_name FROM db2.sqlite_master;
}
} {table t2 t2 table tx tx trigger r1 t2}
ifcapable schema_pragmas {
do_test attach-2.8 {
db_list db
} {0 main 1 temp 2 db2}
} ;# ifcapable schema_pragmas
do_test attach-2.9 {
execsql {
CREATE INDEX i2 ON t2(x);
@ -268,9 +278,11 @@ do_test attach-2.10 {
# SELECT * FROM t2 WHERE x>5;
# }
#} {1 {database schema has changed}}
ifcapable schema_pragmas {
do_test attach-2.12 {
db_list db
} {0 main 1 temp 2 db2}
} ;# ifcapable schema_pragmas
do_test attach-2.13 {
catchsql {
SELECT * FROM t2 WHERE x>5;

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: attach2.test,v 1.29 2004/11/05 05:10:29 drh Exp $
# $Id: attach2.test,v 1.30 2004/11/23 10:13:03 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@ -61,10 +61,12 @@ do_test attach2-2.1 {
ATTACH 'test2.db' AS t2;
}
} {0 {}}
ifcapable schema_pragmas {
do_test attach2-2.2 {
# make sure test2.db did get attached.
db_list db
} {0 main 2 t2}
} ;# ifcapable schema_pragmas
db2 eval {COMMIT}
do_test attach2-2.5 {

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and related functionality.
#
# $Id: auth.test,v 1.23 2004/11/22 11:51:14 danielk1977 Exp $
# $Id: auth.test,v 1.24 2004/11/23 10:13:03 danielk1977 Exp $
#
set testdir [file dirname $argv0]
@ -1654,9 +1654,11 @@ do_test auth-1.259 {
DETACH DATABASE test1;
}
} {0 {}}
ifcapable schema_pragmas {
do_test auth-1.260 {
lindex [execsql {PRAGMA database_list}] 7
} {test1}
} ;# ifcapable schema_pragmas
do_test auth-1.261 {
proc auth {code arg1 arg2 arg3 arg4} {
if {$code=="SQLITE_DETACH"} {
@ -1669,9 +1671,11 @@ do_test auth-1.261 {
DETACH DATABASE test1;
}
} {1 {not authorized}}
ifcapable schema_pragmas {
do_test auth-1.262 {
lindex [execsql {PRAGMA database_list}] 7
} {test1}
} ;# ifcapable schema_pragmas
db authorizer {}
execsql {DETACH DATABASE test1}
db authorizer ::auth

View File

@ -12,7 +12,7 @@
#
# This file implements tests for the PRAGMA command.
#
# $Id: pragma.test,v 1.24 2004/11/14 21:56:31 drh Exp $
# $Id: pragma.test,v 1.25 2004/11/23 10:13:03 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -305,6 +305,7 @@ catchsql {COMMIT;}
# Test schema-query pragmas
#
ifcapable schema_pragmas {
do_test pragma-6.1 {
set res {}
execsql {SELECT * FROM sqlite_temp_master}
@ -340,9 +341,10 @@ do_test pragma-6.5 {
pragma index_info(t3i1);
}
} {0 0 a 1 1 b}
} ;# ifcapable schema_pragmas
# Miscellaneous tests
#
ifcapable schema_pragmas {
do_test pragma-7.1 {
# Make sure a pragma knows to read the schema if it needs to
db close
@ -351,6 +353,7 @@ do_test pragma-7.1 {
pragma index_list(t3);
}
} {0 t3i1 0 1 sqlite_autoindex_t3_1 1}
} ;# ifcapable schema_pragmas
ifcapable {utf16} {
do_test pragma-7.2 {
db close

View File

@ -15,7 +15,7 @@
# interface is pretty well tested. This file contains some addition
# tests for fringe issues that the main test suite does not cover.
#
# $Id: tclsqlite.test,v 1.33 2004/11/03 16:27:02 drh Exp $
# $Id: tclsqlite.test,v 1.34 2004/11/23 10:13:03 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -138,9 +138,13 @@ if {[sqlite3 -tcl-uses-utf]} {
catch {unset ::result}
do_test tcl-2.1 {
execsql "CREATE TABLE t\u0123x(a int, b\u1235 float)"
execsql "PRAGMA table_info(t\u0123x)"
} "0 a int 0 {} 0 1 b\u1235 float 0 {} 0"
do_test tcl-2.2 {
} {}
ifcapable schema_pragmas {
do_test tcl-2.2 {
execsql "PRAGMA table_info(t\u0123x)"
} "0 a int 0 {} 0 1 b\u1235 float 0 {} 0"
}
do_test tcl-2.3 {
execsql "INSERT INTO t\u0123x VALUES(1,2.3)"
db eval "SELECT * FROM t\u0123x" result break
set result(*)