From: danielk1977 Date: Fri, 10 Feb 2006 13:33:30 +0000 (+0000) Subject: Minor test file modifications for builds compiled with OMIT options. (CVS 3077) X-Git-Tag: version-3.6.10~3090 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12f5e2018d5c6b11b044b2f26f687d5e775db616;p=thirdparty%2Fsqlite.git Minor test file modifications for builds compiled with OMIT options. (CVS 3077) FossilOrigin-Name: c468aa349db4e6571711bf94781b88aa3c811d03 --- diff --git a/manifest b/manifest index d19e87fcf7..eb66d42585 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sdocumentation\sfor\snew\sAPIs.\s(CVS\s3076) -D 2006-02-10T13:14:21 +C Minor\stest\sfile\smodifications\sfor\sbuilds\scompiled\swith\sOMIT\soptions.\s(CVS\s3077) +D 2006-02-10T13:33:31 F Makefile.in 5d8dff443383918b700e495de42ec65bc1c8865b F Makefile.linux-gcc 74ba0eadf88748a9ce3fd03d2a3ede2e6715baec F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -131,7 +131,7 @@ F test/btree6.test a5ede6bfbbb2ec8b27e62813612c0f28e8f3e027 F test/btree7.test a6d3b842db22af97dd14b989e90a2fd96066b72f F test/btree8.test fadc112bcbd6a0c622d34c813fc8a648eacf8804 F test/busy.test 0271c854738e23ad76e10d4096a698e5af29d211 -F test/capi2.test e7d3f2e719726c7e3be2c1c69eb4177c5165fad8 +F test/capi2.test cddd151c7b687e9e00fde408b9547ec93c2146a4 F test/capi3.test 6f9f22408b03ee1cef747caa15f7ed55cbe0d08c F test/capi3b.test 5f0bc94b104e11086b1103b20277e1910f59c7f4 F test/cast.test aabdcb3873bb2f40d855bf63950f6d99a5a196c7 @@ -142,7 +142,7 @@ F test/collate3.test 947a77f5b8227e037a7094d0e338a5504f155cc4 F test/collate4.test daf498e294dcd596b961d425c3f2dda117e4717e F test/collate5.test 8fb4e7e0241839356bd8710f437c32efb47bfff8 F test/collate6.test 6c9470d1606ee3e564675b229653e320c49ec638 -F test/colmeta.test 4c385cf4c9c22cab9b12af8db15f71675b8b0f73 +F test/colmeta.test 6505c73ab58796afcb7c89ba9f429d573fbc6e53 F test/conflict.test 16533a92675f9752c25596093a4d549af7fc3d34 F test/corrupt.test 18c7a995b1af76a8c8600b996257f2c7b7bff083 F test/corrupt2.test 88342570828f2b8cbbd8369eff3891f5c0bdd5ba @@ -175,7 +175,7 @@ F test/insert2.test 5a20e1ace5fa0800b58d28284212290189b49aed F test/insert3.test 0096bd9766f94f4fa06ef712658e590b782cb44f F test/interrupt.test cd24dc5bedd02325be4bfa5d6209fae01c465157 F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30 -F test/ioerr.test 42581999ad54d5afe4d703550b1faf308e8cb53c +F test/ioerr.test 804d56cfa698e7c90590921f984eb49ceb30c2a9 F test/join.test db3802739fb695bdfa2e88805e3d64ec5ffbebd1 F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 @@ -256,7 +256,7 @@ F test/tkt1514.test baa587a69fa2e8d575ebdaf1460f711281dcba49 F test/tkt1536.test 83ff7a7b6e248016f8d682d4f7a4ae114070d466 F test/tkt1537.test e3a14332de9770be8ff14bd15c19a49cbec10808 F test/tkt1567.test 18023cc3626a365f0118e17b66decedec93b1a6f -F test/tkt1644.test 8926ebffd19950a7cce22734a06d8282a69c3a20 +F test/tkt1644.test 80b6a2bb17885f3cf1cb886d97cdad13232bb869 F test/tkt1667.test c7faac5050b45d81d0b9f6294e4570b588106e19 F test/trace.test 75ffc1b992c780d054748a656e3e7fd674f18567 F test/trans.test b25eae982d156867eac338409905fd4ca589b7f8 @@ -352,7 +352,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 4b6f5688843ebe39f6bd3e863666a44d486fbe0f -R e16ab060e2ea8f3c75745aba1282f4f4 +P 84c2a5c4d753d1e39136ac7e80ac816442af0a49 +R 3b5f77c65783323e18ca74eb7ebf8d91 U danielk1977 -Z a2ce105beec66212c267fbbe4c9ef5e8 +Z ad1ff9bbe1c59dd9d2009c7724c25ca8 diff --git a/manifest.uuid b/manifest.uuid index f6c2a947d8..5be70f9b32 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -84c2a5c4d753d1e39136ac7e80ac816442af0a49 \ No newline at end of file +c468aa349db4e6571711bf94781b88aa3c811d03 \ No newline at end of file diff --git a/test/capi2.test b/test/capi2.test index 3181a498ee..79283ac2cf 100644 --- a/test/capi2.test +++ b/test/capi2.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi2.test,v 1.30 2006/02/10 07:07:16 danielk1977 Exp $ +# $Id: capi2.test,v 1.31 2006/02/10 13:33:31 danielk1977 Exp $ # set testdir [file dirname $argv0] @@ -686,98 +686,103 @@ do_test capi2-11.2 { do_test capi2-11.3 { check_origins {SELECT col2 AS hello, col1 AS world FROM tab1} } [list {main tab1 col2} {main tab1 col1}] -do_test capi2-11.4 { - check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM tab1)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-11.5 { - check_origins {SELECT (SELECT col2 FROM tab1), (SELECT col1 FROM tab1)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-11.6 { - check_origins {SELECT (SELECT col2), (SELECT col1) FROM tab1} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-11.7 { - check_origins {SELECT * FROM tab1} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-11.8 { - check_origins {SELECT * FROM (SELECT * FROM tab1)} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-12.1 { - execsql { - CREATE VIEW view1 AS SELECT * FROM tab1; - } -} {} -do_test capi2-12.2 { - check_origins {SELECT col2, col1 FROM view1} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-12.3 { - check_origins {SELECT col2 AS hello, col1 AS world FROM view1} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-12.4 { - check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view1)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-12.5 { - check_origins {SELECT (SELECT col2 FROM view1), (SELECT col1 FROM view1)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-12.6 { - check_origins {SELECT (SELECT col2), (SELECT col1) FROM view1} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-12.7 { - check_origins {SELECT * FROM view1} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-12.8 { - check_origins {select * from (select * from view1)} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-12.9 { - check_origins {select * from (select * from (select * from view1))} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-12.10 { - db close - sqlite3 db test.db - set ::DB [sqlite3_connection_pointer db] - check_origins {select * from (select * from (select * from view1))} -} [list {main tab1 col1} {main tab1 col2}] +ifcapable subquery { + do_test capi2-11.4 { + check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM tab1)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-11.5 { + check_origins {SELECT (SELECT col2 FROM tab1), (SELECT col1 FROM tab1)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-11.6 { + check_origins {SELECT (SELECT col2), (SELECT col1) FROM tab1} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-11.7 { + check_origins {SELECT * FROM tab1} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-11.8 { + check_origins {SELECT * FROM (SELECT * FROM tab1)} + } [list {main tab1 col1} {main tab1 col2}] +} -# This view will thwart the flattening optimization. -do_test capi2-13.1 { - execsql { - CREATE VIEW view2 AS SELECT * FROM tab1 limit 10 offset 10; - } -} {} -breakpoint -do_test capi2-13.2 { - check_origins {SELECT col2, col1 FROM view2} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-13.3 { - check_origins {SELECT col2 AS hello, col1 AS world FROM view2} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-13.4 { - check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view2)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-13.5 { - check_origins {SELECT (SELECT col2 FROM view2), (SELECT col1 FROM view2)} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-13.6 { - check_origins {SELECT (SELECT col2), (SELECT col1) FROM view2} -} [list {main tab1 col2} {main tab1 col1}] -do_test capi2-13.7 { - check_origins {SELECT * FROM view2} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-13.8 { - check_origins {select * from (select * from view2)} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-13.9 { - check_origins {select * from (select * from (select * from view2))} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-13.10 { - db close - sqlite3 db test.db - set ::DB [sqlite3_connection_pointer db] - check_origins {select * from (select * from (select * from view2))} -} [list {main tab1 col1} {main tab1 col2}] -do_test capi2-13.11 { - check_origins {select * from (select * from tab1 limit 10 offset 10)} -} [list {main tab1 col1} {main tab1 col2}] +ifcapable view&&subquery { + do_test capi2-12.1 { + execsql { + CREATE VIEW view1 AS SELECT * FROM tab1; + } + } {} + do_test capi2-12.2 { + check_origins {SELECT col2, col1 FROM view1} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-12.3 { + check_origins {SELECT col2 AS hello, col1 AS world FROM view1} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-12.4 { + check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view1)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-12.5 { + check_origins {SELECT (SELECT col2 FROM view1), (SELECT col1 FROM view1)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-12.6 { + check_origins {SELECT (SELECT col2), (SELECT col1) FROM view1} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-12.7 { + check_origins {SELECT * FROM view1} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-12.8 { + check_origins {select * from (select * from view1)} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-12.9 { + check_origins {select * from (select * from (select * from view1))} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-12.10 { + db close + sqlite3 db test.db + set ::DB [sqlite3_connection_pointer db] + check_origins {select * from (select * from (select * from view1))} + } [list {main tab1 col1} {main tab1 col2}] + + # This view will thwart the flattening optimization. + do_test capi2-13.1 { + execsql { + CREATE VIEW view2 AS SELECT * FROM tab1 limit 10 offset 10; + } + } {} + breakpoint + do_test capi2-13.2 { + check_origins {SELECT col2, col1 FROM view2} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-13.3 { + check_origins {SELECT col2 AS hello, col1 AS world FROM view2} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-13.4 { + check_origins {SELECT b, a FROM (SELECT col1 AS a, col2 AS b FROM view2)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-13.5 { + check_origins {SELECT (SELECT col2 FROM view2), (SELECT col1 FROM view2)} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-13.6 { + check_origins {SELECT (SELECT col2), (SELECT col1) FROM view2} + } [list {main tab1 col2} {main tab1 col1}] + do_test capi2-13.7 { + check_origins {SELECT * FROM view2} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-13.8 { + check_origins {select * from (select * from view2)} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-13.9 { + check_origins {select * from (select * from (select * from view2))} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-13.10 { + db close + sqlite3 db test.db + set ::DB [sqlite3_connection_pointer db] + check_origins {select * from (select * from (select * from view2))} + } [list {main tab1 col1} {main tab1 col2}] + do_test capi2-13.11 { + check_origins {select * from (select * from tab1 limit 10 offset 10)} + } [list {main tab1 col1} {main tab1 col2}] +} } ;# ifcapable columnmetadata diff --git a/test/colmeta.test b/test/colmeta.test index 4285356557..c2513e6f82 100644 --- a/test/colmeta.test +++ b/test/colmeta.test @@ -12,7 +12,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is the sqlite3_table_column_metadata() API. # -# $Id: colmeta.test,v 1.2 2006/02/10 12:48:55 danielk1977 Exp $ +# $Id: colmeta.test,v 1.3 2006/02/10 13:33:31 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -28,11 +28,20 @@ do_test colmeta-0 { CREATE TABLE abc(a, b, c); CREATE TABLE abc2(a PRIMARY KEY COLLATE NOCASE, b VARCHAR(32), c); CREATE TABLE abc3(a NOT NULL, b INTEGER PRIMARY KEY, c); - CREATE TABLE abc4(a, b INTEGER PRIMARY KEY AUTOINCREMENT, c); - CREATE VIEW v1 AS SELECT * FROM abc2; + } + ifcapable autoinc { + execsql { + CREATE TABLE abc4(a, b INTEGER PRIMARY KEY AUTOINCREMENT, c); + } + } + ifcapable view { + execsql { + CREATE VIEW v1 AS SELECT * FROM abc2; + } } } {} + # Return values are of the form: # # { } @@ -45,16 +54,24 @@ set tests { 5 {{} abc2 a} {0 {{} NOCASE 0 1 0}} 6 {{} abc3 a} {0 {{} BINARY 1 0 0}} 7 {{} abc3 b} {0 {INTEGER BINARY 0 1 0}} - 8 {{} abc4 b} {0 {INTEGER BINARY 0 1 1}} - 9 {{} v1 a} {1 {no such table column: v1.a}} - 10 {main v1 b} {1 {no such table column: v1.b}} - 11 {main v1 badname} {1 {no such table column: v1.badname}} - 12 {main v1 rowid} {1 {no such table column: v1.rowid}} 13 {main abc rowid} {0 {INTEGER BINARY 0 1 0}} 14 {main abc3 rowid} {0 {INTEGER BINARY 0 1 0}} - 15 {main abc4 rowid} {0 {INTEGER BINARY 0 1 1}} 16 {main abc d} {1 {no such table column: abc.d}} } +ifcapable view { + set tests [concat $tests { + 8 {{} abc4 b} {0 {INTEGER BINARY 0 1 1}} + 15 {main abc4 rowid} {0 {INTEGER BINARY 0 1 1}} + }] +} +ifcapable view { + set tests [concat $tests { + 9 {{} v1 a} {1 {no such table column: v1.a}} + 10 {main v1 b} {1 {no such table column: v1.b}} + 11 {main v1 badname} {1 {no such table column: v1.badname}} + 12 {main v1 rowid} {1 {no such table column: v1.rowid}} + }] +} foreach {tn params results} $tests { set ::DB [sqlite3_connection_pointer db] diff --git a/test/ioerr.test b/test/ioerr.test index 47a1dadd6b..278e1682ad 100644 --- a/test/ioerr.test +++ b/test/ioerr.test @@ -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.25 2006/01/24 13:09:33 danielk1977 Exp $ +# $Id: ioerr.test,v 1.26 2006/02/10 13:33:31 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -236,7 +236,7 @@ do_ioerr_test ioerr-10 -tclprep { CREATE TABLE t1(a PRIMARY KEY, b); } for {set i 0} {$i < 500} {incr i} { - execsql {INSERT INTO t1 VALUES($i, 'hello world');} + execsql {INSERT INTO t1 VALUES(:i, 'hello world');} } execsql { COMMIT; diff --git a/test/tkt1644.test b/test/tkt1644.test index 8772ca7802..aa26a88d33 100644 --- a/test/tkt1644.test +++ b/test/tkt1644.test @@ -19,7 +19,7 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -ifcapable !tempdb { +ifcapable !tempdb||!view { finish_test return }