]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)
authordanielk1977 <danielk1977@noemail.net>
Wed, 12 Sep 2007 17:01:45 +0000 (17:01 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Wed, 12 Sep 2007 17:01:45 +0000 (17:01 +0000)
FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df

47 files changed:
manifest
manifest.uuid
src/btree.c
src/date.c
src/test3.c
src/test7.c
src/test_server.c
src/utf.c
test/alter2.test
test/attach.test
test/avtrans.test
test/badutf.test
test/createtab.test
test/func.test
test/incrblob_err.test
test/insert3.test
test/insert4.test
test/io.test
test/ioerr2.test
test/like.test
test/malloc.test
test/malloc8.test
test/mallocA.test
test/mallocB.test
test/mallocC.test
test/misc2.test
test/misc5.test
test/pragma2.test
test/ptrchng.test
test/rollback.test
test/select7.test
test/shared.test
test/softheap1.test
test/speed3.test
test/substr.test
test/tableapi.test
test/tclsqlite.test
test/tkt2141.test
test/tkt2192.test
test/tkt2251.test
test/tkt2332.test
test/tkt2339.test
test/tkt2409.test
test/trans.test
test/where2.test
test/where4.test
test/zeroblob.test

index 98f7ef32db8c7a902979b798a599c39864ea5ab3..8e026ce4e5be351420b48c4348383846a034f6bb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C In\sthe\squery\soptimizer,\smake\ssure\stable\sdependencies\sfrom\sall\sterms\nof\sa\scompound\sSELECT\sstatement\sare\srecognized\sso\sthat\ssubqueries\sin\na\sWHERE\sclause\sare\snot\sevaluated\stoo\searly.\s\sFix\sfor\sticket\s#2640.\s(CVS\s4422)
-D 2007-09-12T15:41:01
+C Fixes\sfor\scompilation/testing\swhen\sthe\svarious\sOMIT\smacros\sare\sdefined.\s(CVS\s4423)
+D 2007-09-12T17:01:45
 F Makefile.in cbfb898945536a8f9ea8b897e1586dd1fdbcc5db
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -81,13 +81,13 @@ F src/analyze.c 49b4bd45eb286d833793ed6bf72355a5c1974865
 F src/attach.c 02fd8779270b1df1c63e7ba6e6655b960fa0f3d5
 F src/auth.c d41c34f3150b3b8248d364770ef922bbcefbff82
 F src/btmutex.c 442be6f068d77ca9ffd69899cf0a3943c244548c
-F src/btree.c 30f7efafc4f5818477b80cf77b3d05acd2805ab7
+F src/btree.c ac94b8a9b0fb042b0284c0db5575740d27872558
 F src/btree.h d0736ebca4b6eafbdd823c46a8de574cea078211
 F src/btreeInt.h 4330c19b8314545fdb209cc77e2a57f6a5290e9c
 F src/build.c 94d0d6dfd1e706c480903fbdda2e77466f21b898
 F src/callback.c 77b302b0d41468dcda78c70e706e5b84577f0fa0
 F src/complete.c 4cf68fd75d60257524cbe74f87351b9848399131
-F src/date.c af235f38f50809abd0a96da3bb3e0cc32be6226e
+F src/date.c 49c5a6d2de6c12000905b4d36868b07d3011bbf6
 F src/delete.c 849846d06d29851dde0d9f424a5de5817eb140d1
 F src/experimental.c 1b2d1a6cd62ecc39610e97670332ca073c50792b
 F src/expr.c 7853a8161ec0b0fce62fc8da921db557899f1ec1
@@ -138,11 +138,11 @@ F src/table.c 1aeb9eab57b4235db86fe15a35dec76fb445a9c4
 F src/tclsqlite.c c3f864a9891aa32b0d65dcda4c50784c047c5a0a
 F src/test1.c 738f9b4ab808dcfec1516ef699c416e3f4f1d119
 F src/test2.c 77b34303883b9d722c65a6879bb0163a400e3789
-F src/test3.c 63e49781476f95e6167b441bf98b93392938a850
+F src/test3.c 73c1fd55d1ece61f295a6b9204fd97a139de86ae
 F src/test4.c c2c0f5dc907f1346f5d4b65eb5799f11eb9e4071
 F src/test5.c 3a6a5717a149d7ca2e6d14f5be72cf7555d54dc4
 F src/test6.c 0513982dfef4da2a4154b538d2bf538b84ca21d3
-F src/test7.c a9d509d0e9ad214b4772696f49f6e61be26213d1
+F src/test7.c ae24ba989ecc2dc600d93c6311191b5d0c596f2b
 F src/test8.c f113aa3723a52113d0fa7c28155ecd37e7e04077
 F src/test9.c b46c8fe02ac7cca1a7316436d8d38d50c66f4b2f
 F src/test_async.c c913005fbe672679c465b8027524e44d0805b52d
@@ -154,13 +154,13 @@ F src/test_loadext.c 22065d601a18878e5542191001f0eaa5d77c0ed8
 F src/test_malloc.c c34e7696dc4a5150c82452be28b87c7e38ba15ad
 F src/test_md5.c 34599caee5b1c73dcf86ca31f55846fab8c19ef7
 F src/test_schema.c 12c9de7661d6294eec2d57afbb52e2af1128084f
-F src/test_server.c 1020673fc02ba5bbfa5dc96ded9f54f0f3744d38
+F src/test_server.c a6ece6c835e7eae835054124e09e947e422b1ac5
 F src/test_tclvar.c b2d1115e4d489179d3f029e765211b2ad527ba59
 F src/test_thread.c a98d69cae883e53d3686fc25889a5fa5f51439f8
 F src/tokenize.c 67e42600ab34f976f2b1288c499ad6c98d652f0e
 F src/trigger.c 724a77d54609a33bde90618934fbeddfcc729a10
 F src/update.c e89b980b443d44b68bfc0b1746cdb6308e049ac9
-F src/utf.c 3cb3e9a460fee5634e08501a037d2e768bb2047b
+F src/utf.c e8c72a123570061b8088d929e403d4fc09193be7
 F src/util.c 49263637e0f228411201501ddfd1138338d6322c
 F src/vacuum.c 38745037c63246d1b0669038257890cf89fc4578
 F src/vdbe.c b6c53921512496ef4d7c4f571feb73b7a495db35
@@ -177,14 +177,14 @@ F tclinstaller.tcl 4356d9d94d2b5ed5e68f9f0c80c4df3048dd7617
 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2
 F test/all.test b59d1bd8b0c1d4a08b845e8af48fd43926f01f11
 F test/alter.test c2a9402e17a731e5294ef370214bd9f88351d18d
-F test/alter2.test 50c3f554b8236d179d72511c0a4f23c5eb7f2af3
+F test/alter2.test 816574fd9302af05e95895758aff2811090c6c78
 F test/alter3.test a6eec8f454be9b6ce73d8d7dc711453675a10ce7
 F test/altermalloc.test 1f4d2d66750bea1a78cd9f0b7dba5bfb155dd6cf
 F test/analyze.test 2f55535aa335785db1a2f97d3f3831c16c09f8b0
 F test/async.test eca5ea2646ea4adfbfa276fa710238e79eb1d477
 F test/async2.test e56affa75ed822424a6f9b12b22db8031433bb7c
 F test/async3.test 08ea0217083e4866eb1b0147158298f2a2cd1346
-F test/attach.test b849e1baae863c3a6132ff8b9b1baf356ab6c178
+F test/attach.test 8880661ee05a7fdeb2d3868e66c08aab21cec8f1
 F test/attach2.test 78bc1a25ea8785c7571b44f5947ada2bd5d78127
 F test/attach3.test eafcafb107585aecc2ed1569a77914138eef46a9
 F test/attachmalloc.test fdbfd9dc0b600db14f9189690c6c12511cc3a56f
@@ -195,8 +195,8 @@ F test/autovacuum.test 4339e66003b9cf813dd667a83aed2dee27c4c36d
 F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31
 F test/autovacuum_ioerr.test c46a76869cb6eddbbb40b419b2b6c4c001766b1f
 F test/autovacuum_ioerr2.test dc189f323cf0546289b5a9bbda60bcb1fe52bd4b
-F test/avtrans.test 365beb46116ec0a1a5b0cab8ce0df63d62367208
-F test/badutf.test e5cd3fd946b76fb0d05024156618ed905298f44a
+F test/avtrans.test 1e901d8102706b63534dbd2bdd4d8f16c4082650
+F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
 F test/between.test 16b1776c6323faadb097a52d673e8e3d8be7d070
 F test/bigfile.test 9a6a8346e4042d9c781ed6cb6553ac871ae30618
 F test/bigrow.test f0aeb7573dcb8caaafea76454be3ade29b7fc747
@@ -237,7 +237,7 @@ F test/crash.test 24020168cc42977a4dd83ff78d2b5eb6577715db
 F test/crash2.test 26d7a4c5520201e5de2c696ea51ab946b59dc0e9
 F test/crash3.test 0b09687ae1a3ccbcefdfaeb4b963e26e36255d76
 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
-F test/createtab.test b562aba1a65be49935fc43a04e90766e39231804
+F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272
 F test/date.test b2bd57ff2ab6185b9322306f7b68fa647d63c857
 F test/default.test 252298e42a680146b1dd64f563b95bdf088d94fb
 F test/delete.test 525a6953bc3978780cae35f3eaf1027cf4ce887d
@@ -305,7 +305,7 @@ F test/fts3an.test 2da4df52fe8ea8389f6fa7a01e4c1a0f091118d6
 F test/fts3ao.test 0aa29dd4fc1c8d46b1f7cfe5926f7ac97551bea9
 F test/fts3atoken.test 25c2070e1e8755d414bf9c8200427b277a9f99fa
 F test/fts3b.test 94cd8a2fb709c99c1617df01f6908de77892d8bc
-F test/func.test 71b39d44a0dffe123145b7c2973e8c4fb8a67ffd
+F test/func.test 590fe3e1d28256d98dd73efb671de0823043e82a
 F test/fuzz.test 62fc19dd36a427777fd671b569df07166548628a
 F test/fuzz2.test ea38692ce2da99ad79fe0be5eb1a452c1c4d37bb
 F test/fuzz_common.tcl ff4bc2dfc465f6878f8e2d819620914365382731
@@ -315,7 +315,7 @@ F test/icu.test e6bfae7f625c88fd14df6f540fe835bdfc1e4329
 F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d
 F test/in2.test b1f447f4f0f67e9f83ff931e7e2e30873f9ea055
 F test/incrblob.test daad09b0d18eb419ac824c9896b7432882f9c0a5
-F test/incrblob_err.test 0adf87296ad14cef6a23cd9283f81cc836c5a332
+F test/incrblob_err.test 5273097dc7c97f9b7008423a6ffd5c80d21923cb
 F test/incrvacuum.test 985bc94a7ff544db09aec3a0c93c779280da9415
 F test/incrvacuum2.test 82397ceb5941cbe852fd29bb33fcdf5665bc80c2
 F test/incrvacuum_ioerr.test cb331403b8dea3c5bae6163861ff25037b0df56a
@@ -324,13 +324,13 @@ F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
 F test/index3.test f66718cd92ce1216819d47e6a156755e4b2c4ca1
 F test/insert.test aef273dd1cee84cc92407469e6bd1b3cdcb76908
 F test/insert2.test 5a20e1ace5fa0800b58d28284212290189b49aed
-F test/insert3.test 72ea6056811fd234f80d923f977c196089947381
-F test/insert4.test 9b10c6231e04241f527f44b454bf3507e7033d16
+F test/insert3.test 9a4ef3526fd3cca8b05278020ec3100448b4c677
+F test/insert4.test d7d256791e549de24e0a27a213405e1204e7a4dd
 F test/interrupt.test 81555fb0f8179bb2d0dc7151fd75428223f93cf2
 F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30
-F test/io.test 9aad06bbcd178f3c0ad6380c1f89df1edecefd6f
+F test/io.test d497d43f4704e88e64c9e55c7e5edd8b5bcc6f5b
 F test/ioerr.test 4b175825ed42b04f935e00f57cfb2a9f0c13de7d
-F test/ioerr2.test f938eadb12108048813869b86beee4a2f98e34b8
+F test/ioerr2.test e3d52c40f43f9b61da9b38951a737e7b84ebae96
 F test/join.test af0443185378b64878750aa1cf4b83c216f246b4
 F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324
 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
@@ -339,7 +339,7 @@ F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe
 F test/journal1.test 36f2d1bb9bf03f790f43fbdb439e44c0657fab19
 F test/lastinsert.test 474d519c68cb79d07ecae56a763aa7f322c72f51
 F test/laststmtchanges.test 18ead86c8a87ade949a1d5658f6dc4bb111d1b02
-F test/like.test 9b8eb634d2c34b36b365c1baae115c9bd6e56674
+F test/like.test 2a2cd2d67ea43526b97c001304a6311717331a6a
 F test/limit.test 2a87b9cb2165abb49ca0ddcf5cb43cf24074581f
 F test/loadext.test 1911e7365a6d31d77ba00dd3a8a31b7f2111a670
 F test/loadext2.test 95ca7e2cb03fd3e068de97c3a2fe58dbdfd769e1
@@ -348,18 +348,18 @@ F test/lock2.test 5f9557b775662c2a5ee435378f39e10d64f65cb3
 F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9
 F test/lock4.test f358fa835dff485d462072eee991111f09e87441
 F test/main.test 05f585bb70c05caac3e047903b517cbb319ed204
-F test/malloc.test 5b4ac16e0e11cca99a25574298eb5ac8e93236db
+F test/malloc.test 51675aa9dba74480391e31d2b57e54e67d9169c1
 F test/malloc2.test c1a74f46a3581b56df29ff46a4e1c99b41c44ad9
 F test/malloc3.test d10a1f484805be103f154ce4968f76ba5d530217
 F test/malloc4.test f0e5e0f639f61e2776a6c3f5308f836b3ad8b3c7
 F test/malloc5.test b2fd56b369dd5884ad88edfaef41304393809125
 F test/malloc6.test dfb0fcbe40abf18833ddefbe17b688dc665a4a5f
 F test/malloc7.test 0d71bb6520b99934b551fa36a9c591404aeaad61
-F test/malloc8.test 2c7a2612b1996232018f58c002acf7e634ab3bca
+F test/malloc8.test addc27d907fec1af429551b95c72caa47fce2974
 F test/malloc9.test 95d7069ad4fa262bf33bc4c5ca0a46f2bb2391cb
-F test/mallocA.test 27d0d275f96cb9e1ede278a3951013f40eea669d
-F test/mallocB.test f55be22689e40599c20bfc449caafc97da32e8ca
-F test/mallocC.test cebc4b6ee430fe73f378c1ec7f7210cb7c1ecc33
+F test/mallocA.test f474c5bdbef4070e11c89d01ba1b0e78f955b97a
+F test/mallocB.test 83bdbea443cc81758a57b0287807b0941218819a
+F test/mallocC.test 7d3b19d2fee772ee309c21e0e31153f8df750f32
 F test/mallocD.test 473db9092f962685ca5710a153d2abbe3428bb9e
 F test/malloc_common.tcl 6cd3c6b540cd53dea828ee2b15a2b72b297b7b30
 F test/manydb.test 8de36b8d33aab5ef295b11d9e95310aeded31af8
@@ -368,10 +368,10 @@ F test/memleak.test d2d2a1ff7105d32dc3fdf691458cf6cba58c7217
 F test/minmax.test 66434d8ee04869fe4c220b665b73748accbb9163
 F test/minmax2.test 8294b6728819608861ba0e06ac1d9a87c4d815b5
 F test/misc1.test 27a6ad11ba6e4b73aeee650ab68053ad7dfd0433
-F test/misc2.test d35faf7df27750d25ab656ca92dceebbd89f7368
+F test/misc2.test 1ee89298de9c16b61454658b24999c403e86afe4
 F test/misc3.test 7bd937e2c62bcc6be71939faf068d506467b1e03
 F test/misc4.test 21e8a275cadcf2ba2a9ac2c33ae024ecc5eaff3a
-F test/misc5.test c7d2d2a5a20dc37d3605a8067f0df5af2240122e
+F test/misc5.test ef90b03ae715b718f07fd084cccb4ef9eb1658e3
 F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
 F test/misc7.test a67af9620a510ce19f96ba69f3848228b7c62a73
 F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33
@@ -384,15 +384,15 @@ F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
 F test/pageropt.test 51e3c091bc2992f5098f7576e3594e1908988939
 F test/pagesize.test e0a8b3fe80f8b8e808d94a00734c7a18c76c407e
 F test/pragma.test b0e73879206934a835856a8b8c4cc884cd8562f3
-F test/pragma2.test bb5aa7be00dae2c381fcc782358048a33c955793
+F test/pragma2.test 5e063bf1d4dfd6baa885cd1809fcd5b2609e9dab
 F test/printf.test 6bf1a86c6a1e45536f72d782bf44c8e3c76510f8
 F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301 x
-F test/ptrchng.test 1c712dd6516e1377471744fa765e41c79a357da6
+F test/ptrchng.test 38ae1806833d72d9a81a6121322e274f24937e18
 F test/quick.test bedc5696abff22532b6df7da2b073254b15e53b7
 F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6
 F test/rdonly.test b34db316525440d3b42c32e83942c02c37d28ef0
 F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b
-F test/rollback.test ee0bbe2b5bf30aba3e6eeb50a2a7e475ac79eb70
+F test/rollback.test 0bd29070ba2f76da939347773fbda53337ebd61c
 F test/rowid.test d125991eea1ffdea800d48471afd8fc4acc10b01
 F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851
 F test/schema.test 401585200727464ef6bb0b3ba0f085f99a87cdce
@@ -403,26 +403,26 @@ F test/select3.test 47439f28862489626b483b0c718cfb0562e6f6d5
 F test/select4.test 305ba0a6e97efc5544def5e5cb49b54e1bf87fd9
 F test/select5.test 0b47058d3e916c1fc9fe81f44b438e02bade21ce
 F test/select6.test 399f14b9ba37b768afe5d2cd8c12e4f340a69db8
-F test/select7.test 45606f9afbe2056058c7d75fc33e5092e65ec770
+F test/select7.test 7906735805cfbee4dddc0bed4c14e68d7f5f9c5f
 F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c
-F test/shared.test 90ab9f5492168bf7ee5c0c3b3bc0d0d287cebc00
+F test/shared.test 3f27bca85ba3c032c346f895d42d4110cb5288e6
 F test/shared2.test 0ee9de8964d70e451936a48c41cb161d9134ccf4
 F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749
 F test/shared_err.test bfe49fbbf26746a3c05255b1dc7230744182b744
 F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b
-F test/softheap1.test 0c49aa6eee25e7d32943e85e8d1f20eff566b1dc
+F test/softheap1.test 29cbdb847e63ffef3af5da1e3cd15f44ee11d770
 F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5
 F test/speed1.test 22e1b27af0683ed44dcd2f93ed817a9c3e65084a
 F test/speed2.test 53177056baf6556dcbdcf032bbdfc41c1aa74ded
-F test/speed3.test 55e039b34d505aa442cee415f83c451ae28b3123
+F test/speed3.test 688fe59ea7b4eabf62b955447aa6cc3249d69d7d
 F test/sqllimits1.test 2495508114bd84f6fc9ece34d5a7bb3dc69359bc
 F test/subquery.test ae324ee928c5fb463a3ce08a8860d6e7f1ca5797
 F test/subselect.test 974e87f8fc91c5f00dd565316d396a5a6c3106c4
-F test/substr.test 9f26cfca74397b26ab217fb838c3d0549eb4bcf3
+F test/substr.test d36c864a238e1f51e7829af660906f05d47b5e32
 F test/sync.test d05397b8f89f423dd6dba528692019ab036bc1c3
 F test/table.test dbdfd06aef054ad5aed8e57a782137d57d5c5528
-F test/tableapi.test 036575a98dcce7c92e9f39056839bbad8a715412
-F test/tclsqlite.test a868898e3350246be7ea132621dc25f9835b3030
+F test/tableapi.test 92651a95c23cf955e92407928e640536402fa3cc
+F test/tclsqlite.test c7feea1985c3e8a1ed134ba342347d47fa762e43
 F test/temptable.test c36f3e5a94507abb64f7ba23deeb4e1a8a8c3821
 F test/tester.tcl 913a808f05b0aed2fbb16481a423b1a5a118bdf0
 F test/thread001.test 8fbd9559da0bbdc273e00318c7fd66c162020af7
@@ -446,19 +446,19 @@ F test/tkt1567.test 18023cc3626a365f0118e17b66decedec93b1a6f
 F test/tkt1644.test 80b6a2bb17885f3cf1cb886d97cdad13232bb869
 F test/tkt1667.test ef52c857940755ea5eab24d68f808826e7dcdc94
 F test/tkt1873.test 7159a1c1bf627bbb03f11362e4ad4de11d6ff316
-F test/tkt2141.test 78fb8ea2e7e38f7e5b3e649ca9426928056ef55c
-F test/tkt2192.test 480d0e017ddb01a46ee20809427370f343bb3c03
+F test/tkt2141.test f543d96f50d5a5dc0bc744f7db74ea166720ce46
+F test/tkt2192.test d213199a51528feb2a0f80b5ee60d1e2abfd9679
 F test/tkt2213.test 8cf7c446e1fcd0627fffe7fc19046eb24ac7333b
-F test/tkt2251.test 3f0549213386ed911715665a908ff2bb7a871002
+F test/tkt2251.test 5aab8c7898cd2df2a68fe19289cc29e8f5cf8c82
 F test/tkt2285.test c618085f0c13ec3347e607f83c34ada0721b4bfa
-F test/tkt2332.test cb1bb0ed1ae6a3b9ff412520ed4a496745f4ffa5
-F test/tkt2339.test 7016415bda86af1406a27260ac46f44885617606
+F test/tkt2332.test fc955609b958ca86dfa102832243370a0cc84070
+F test/tkt2339.test 73bd17818924cd2ac442e5fd9916b58565739450
 F test/tkt2391.test ab7a11be7402da8b51a5be603425367aa0684567
-F test/tkt2409.test f130054aedff681883466ad04332bd3f7db51a02
+F test/tkt2409.test 20318bf6acd9b834b4420548f277b8e3a7420cd1
 F test/tkt2450.test 77ed94863f2049c1420288ddfea2d41e5e0971d6
 F test/tkt2640.test c513e7992a602a87ef3a2cc9ca1cba4146924e9b
 F test/trace.test 75ffc1b992c780d054748a656e3e7fd674f18567
-F test/trans.test d132b8af1429a1e006bf4473de9a6e4c7f67a3f4
+F test/trans.test b73289992b46d38d9479ecc4fdc03d8edb2413dc
 F test/trigger1.test b361161cf20614024cc1e52ea0bdec250776b2ae
 F test/trigger2.test 33bf8ae9b788013be194efe5f66c04a202facbb4
 F test/trigger3.test 9102fd3933db294dc654b5aee9edfe9e94f2b9e2
@@ -492,11 +492,11 @@ F test/vtab_alter.test b0c0f61a9588b509c2ba20dedc2db04999da6656
 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
 F test/vtab_shared.test d631d1f820c38c18939d53aab1fc35db5f0a8094
 F test/where.test 1bcde8984c63747ac6d6bafcacd20fd6e8a223de
-F test/where2.test 3249d426b3fc7a106713d784e1628307fc308d2e
+F test/where2.test 9bbf1cc675730954047d663e4c0dc5d4c9669ca4
 F test/where3.test 0a30fe9808b0fa01c46d0fcf4fac0bf6cf75bb30
-F test/where4.test f80207a4ea6504f3d0962f3ecebc7db274ea50c0
+F test/where4.test 1b1cd72d5f205ce34d5a31f3c4918f833e5e6a63
 F test/where5.test fdf66f96d29a064b63eb543e28da4dfdccd81ad2
-F test/zeroblob.test 566fc9826297bb42bfcdcb1e3a2d39f336c16541
+F test/zeroblob.test 7d1854ea79d048e023e5f2e38106a7e99a17435c
 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
 F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
 F tool/lemon.c 0ab4cca47950da4dc04cf957db0c0ed54b464aa9
@@ -576,7 +576,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P c6ee5929e7d1f9b7c351f57ee8886f71ea0b6619
-R d30c1161749c146af96e8835cb148fe8
-U drh
-Z 7de72dd4fad27cd8d1629bca893a1041
+P 9c9c2a1da2b6235b3b0541d1f55a02a1f350567f
+R e714a99afd32daf4589c0492f0d973f7
+U danielk1977
+Z 3ca4821de1ee59d63f410052e38375a2
index 623c5c09befc1025b561603ca30d578ffce24b31..502bbc182e198728d259d4e45f2e38fe9c80490f 100644 (file)
@@ -1 +1 @@
-9c9c2a1da2b6235b3b0541d1f55a02a1f350567f
\ No newline at end of file
+c8405b15c074c94dab5e33272cf1471f458d11df
\ No newline at end of file
index 488503ff5a82b8098566f0cdee44f36f494fa33a..4c38882ea21a2ae37a369801ca71e9632cc14458 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.425 2007/09/07 14:32:07 drh Exp $
+** $Id: btree.c,v 1.426 2007/09/12 17:01:45 danielk1977 Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** See the header comment on "btreeInt.h" for additional information.
@@ -6166,11 +6166,13 @@ int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
     rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
     if( rc==SQLITE_OK ){
       put4byte(&pP1[36 + idx*4], iMeta);
+#ifndef SQLITE_OMIT_AUTOVACUUM
       if( idx==7 ){
         assert( pBt->autoVacuum || iMeta==0 );
         assert( iMeta==0 || iMeta==1 );
         pBt->incrVacuum = iMeta;
       }
+#endif
     }
   }
   sqlite3BtreeLeave(p);
index 50f5f4a837a85c8e640063cfcddd781da1a7631c..ce1c6c7b3918532a8f6551d8012f8574548a6de8 100644 (file)
@@ -16,7 +16,7 @@
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.72 2007/08/24 03:51:33 drh Exp $
+** $Id: date.c,v 1.73 2007/09/12 17:01:45 danielk1977 Exp $
 **
 ** SQLite processes all times and dates as Julian Day numbers.  The
 ** dates and times are stored as the number of days since noon
@@ -988,10 +988,10 @@ static void currentTimeFunc(
 #else
   {
     struct tm *pTm;
-    sqlite3_mutex_enter(sqlite3_mutex_alloc(SQLITE_MUTEX_GLOBAL));
+    sqlite3_mutex_enter(sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER));
     pTm = gmtime(&t);
     strftime(zBuf, 20, zFormat, pTm);
-    sqlite3_mutex_leave(sqlite3_mutex_alloc(SQLITE_MUTEX_GLOBAL));
+    sqlite3_mutex_leave(sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER));
   }
 #endif
 
index a62cb8a0faed8574b3e5e868c57fbf104ef7c8dc..4f14330520ba6f37d12871b3a3ead5c3b03446ed 100644 (file)
@@ -13,7 +13,7 @@
 ** is not included in the SQLite library.  It is used for automated
 ** testing of the SQLite library.
 **
-** $Id: test3.c,v 1.86 2007/09/03 15:19:36 drh Exp $
+** $Id: test3.c,v 1.87 2007/09/12 17:01:45 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "btreeInt.h"
@@ -1398,7 +1398,7 @@ static int btree_ovfl_info(
     sqlite3BtreeLeave(pBt);
     return TCL_ERROR;
   }
-  dataSize = sqlite3BtreeGetPageSize(pBt) - sqlite3BtreeGetReserve(pBt);
+  dataSize = pBt->pBt->usableSize;
   Tcl_DStringInit(&str);
   n = aResult[6] - aResult[8];
   n = (n + dataSize - 1)/dataSize;
index 4f5982899ad27656c14885de35f9188ea3755e63..8e2153a1c128f5ec068369cc526d053cc1553c48 100644 (file)
@@ -12,7 +12,7 @@
 ** Code for testing the client/server version of the SQLite library.
 ** Derived from test4.c.
 **
-** $Id: test7.c,v 1.8 2007/08/22 11:41:18 drh Exp $
+** $Id: test7.c,v 1.9 2007/09/12 17:01:45 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -21,8 +21,8 @@
 ** This test only works on UNIX with a SQLITE_THREADSAFE build that includes
 ** the SQLITE_SERVER option.
 */
-#if OS_UNIX && SQLITE_THREADSAFE && \
-    defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE)
+#if defined(SQLITE_SERVER) && !defined(SQLITE_OMIT_SHARED_CACHE)
+#if defined(OS_UNIX) && OS_UNIX && SQLITE_THREADSAFE
 
 #include <stdlib.h>
 #include <string.h>
@@ -721,3 +721,4 @@ int Sqlitetest7_Init(Tcl_Interp *interp){
 #else
 int Sqlitetest7_Init(Tcl_Interp *interp){ return TCL_OK; }
 #endif /* OS_UNIX */
+#endif
index deb14aa4edcd0d0c69dfa005710d8adf87c3abc3..624249fc1a58999197e915c253b5fb6b7fe670be 100644 (file)
 ** an integer.
 */
 
+/* Include this to get the definition of SQLITE_THREADSAFE, in the
+** case that default values are used.
+*/
+#include "sqliteInt.h"
+
 /*
 ** Only compile the code in this file on UNIX with a SQLITE_THREADSAFE build
 ** and only if the SQLITE_SERVER macro is defined.
index 3170c09ff5346ec9a6c5449d8e9fe98c75ff84b9..4b444afa8a16179347bfa4585525f097a9788aa4 100644 (file)
--- a/src/utf.c
+++ b/src/utf.c
@@ -12,7 +12,7 @@
 ** This file contains routines used to translate between UTF-8, 
 ** UTF-16, UTF-16BE, and UTF-16LE.
 **
-** $Id: utf.c,v 1.57 2007/09/01 11:04:27 danielk1977 Exp $
+** $Id: utf.c,v 1.58 2007/09/12 17:01:45 danielk1977 Exp $
 **
 ** Notes on UTF-8:
 **
@@ -403,6 +403,36 @@ int sqlite3Utf8CharLen(const char *zIn, int nByte){
   return r;
 }
 
+/* This test function is not currently used by the automated test-suite. 
+** Hence it is only available in debug builds.
+*/
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+/*
+** Translate UTF-8 to UTF-8.
+**
+** This has the effect of making sure that the string is well-formed
+** UTF-8.  Miscoded characters are removed.
+**
+** The translation is done in-place (since it is impossible for the
+** correct UTF-8 encoding to be longer than a malformed encoding).
+*/
+int sqlite3Utf8To8(unsigned char *zIn){
+  unsigned char *zOut = zIn;
+  unsigned char *zStart = zIn;
+  unsigned char *zTerm;
+  u32 c;
+
+  while( zIn[0] ){
+    c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn);
+    if( c!=0xfffd ){
+      WRITE_UTF8(zOut, c);
+    }
+  }
+  *zOut = 0;
+  return zOut - zStart;
+}
+#endif
+
 #ifndef SQLITE_OMIT_UTF16
 /*
 ** Convert a UTF-16 string in the native encoding into a UTF-8 string.
@@ -456,36 +486,6 @@ int sqlite3Utf16ByteLen(const void *zIn, int nChar){
   return (z-(char const *)zIn)-((c==0)?2:0);
 }
 
-/* This test function is not currently used by the automated test-suite. 
-** Hence it is only available in debug builds.
-*/
-#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
-/*
-** Translate UTF-8 to UTF-8.
-**
-** This has the effect of making sure that the string is well-formed
-** UTF-8.  Miscoded characters are removed.
-**
-** The translation is done in-place (since it is impossible for the
-** correct UTF-8 encoding to be longer than a malformed encoding).
-*/
-int sqlite3Utf8To8(unsigned char *zIn){
-  unsigned char *zOut = zIn;
-  unsigned char *zStart = zIn;
-  unsigned char *zTerm;
-  u32 c;
-
-  while( zIn[0] ){
-    c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn);
-    if( c!=0xfffd ){
-      WRITE_UTF8(zOut, c);
-    }
-  }
-  *zOut = 0;
-  return zOut - zStart;
-}
-#endif
-
 #if defined(SQLITE_TEST)
 /*
 ** This routine is called from the TCL test function "translate_selftest".
index 9ff4b2d1131535fbdfc3ec0c7d667b711db7feec..9c73992001fbcef1ff3b87a1e10252a8a3b0a9a6 100644 (file)
@@ -13,7 +13,7 @@
 # file format change that may be used in the future to implement
 # "ALTER TABLE ... ADD COLUMN".
 #
-# $Id: alter2.test,v 1.8 2007/05/08 01:08:49 drh Exp $
+# $Id: alter2.test,v 1.9 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -68,11 +68,13 @@ proc get_file_format {{fname test.db}} {
 #
 proc alter_table {tbl sql {file_format 2}} {
   sqlite3 dbat test.db
-  dbat eval {
+  set s [string map {' ''} $sql]
+  set t [string map {' ''} $tbl]
+  dbat eval [subst {
     PRAGMA writable_schema = 1;
-    UPDATE sqlite_master SET sql = $sql WHERE name = $tbl AND type = 'table';
+    UPDATE sqlite_master SET sql = '$s' WHERE name = '$t' AND type = 'table';
     PRAGMA writable_schema = 0;
-  }
+  }]
   dbat close
   set_file_format 2
 }
@@ -259,18 +261,20 @@ do_test alter2-4.5 {
 # resets the file format to 1.
 #
 set default_file_format [expr $SQLITE_DEFAULT_FILE_FORMAT==4 ? 4 : 1]
-do_test alter2-5.1 {
-  set_file_format 2
-  get_file_format
-} {2}
-do_test alter2-5.2 {
-  execsql {
-    VACUUM;
-  }
-} {}
-do_test alter2-5.3 {
-  get_file_format
-} $default_file_format
+ifcapable vacuum {
+  do_test alter2-5.1 {
+    set_file_format 2
+    get_file_format
+  } {2}
+  do_test alter2-5.2 {
+    execsql {
+      VACUUM;
+    }
+  } {}
+  do_test alter2-5.3 {
+    get_file_format
+  } $default_file_format
+}
  
 #---------------------------------------------------------------------
 # Test that when a database with file-format 2 is opened, new 
@@ -397,38 +401,40 @@ ifcapable trigger {
 #-----------------------------------------------------------------------
 # Test creating an index on a column added with a default value. 
 #
-do_test alter2-10.1 {
-  execsql {
-    CREATE TABLE t2(a);
-    INSERT INTO t2 VALUES('a');
-    INSERT INTO t2 VALUES('b');
-    INSERT INTO t2 VALUES('c');
-    INSERT INTO t2 VALUES('d');
-  }
-  alter_table t2 {CREATE TABLE t2(a, b DEFAULT X'ABCD', c DEFAULT NULL);} 3
-  catchsql {
-    SELECT * FROM sqlite_master;
-  }
-  execsql {
-    SELECT quote(a), quote(b), quote(c) FROM t2 LIMIT 1;
-  }
-} {'a' X'ABCD' NULL}
-do_test alter2-10.2 {
-  execsql {
-    CREATE INDEX i1 ON t2(b);
-    SELECT a FROM t2 WHERE b = X'ABCD';
-  }
-} {a b c d}
-do_test alter2-10.3 {
-  execsql {
-    DELETE FROM t2 WHERE a = 'c';
-    SELECT a FROM t2 WHERE b = X'ABCD';
-  }
-} {a b d}
-do_test alter2-10.4 {
-  execsql {
-    SELECT count(b) FROM t2 WHERE b = X'ABCD';
-  }
-} {3}
+ifcapable bloblit {
+  do_test alter2-10.1 {
+    execsql {
+      CREATE TABLE t2(a);
+      INSERT INTO t2 VALUES('a');
+      INSERT INTO t2 VALUES('b');
+      INSERT INTO t2 VALUES('c');
+      INSERT INTO t2 VALUES('d');
+    }
+    alter_table t2 {CREATE TABLE t2(a, b DEFAULT X'ABCD', c DEFAULT NULL);} 3
+    catchsql {
+      SELECT * FROM sqlite_master;
+    }
+    execsql {
+      SELECT quote(a), quote(b), quote(c) FROM t2 LIMIT 1;
+    }
+  } {'a' X'ABCD' NULL}
+  do_test alter2-10.2 {
+    execsql {
+      CREATE INDEX i1 ON t2(b);
+      SELECT a FROM t2 WHERE b = X'ABCD';
+    }
+  } {a b c d}
+  do_test alter2-10.3 {
+    execsql {
+      DELETE FROM t2 WHERE a = 'c';
+      SELECT a FROM t2 WHERE b = X'ABCD';
+    }
+  } {a b d}
+  do_test alter2-10.4 {
+    execsql {
+      SELECT count(b) FROM t2 WHERE b = X'ABCD';
+    }
+  } {3}
+}
 
 finish_test
index af712d04c5e116b062d551d412a8fc9a854d275b..2fb6d7727e51e93bc6d81edfbea583dc5c9333e2 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this script is testing the ATTACH and DETACH commands
 # and related functionality.
 #
-# $Id: attach.test,v 1.45 2007/08/29 17:43:20 drh Exp $
+# $Id: attach.test,v 1.46 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
@@ -736,13 +736,15 @@ db close
 file delete -force test2.db
 file delete -force no-such-file
 
-do_test attach-7.1 {
-  file delete -force test.db test.db-journal
-  sqlite3 db test.db
-  catchsql {
-    DETACH RAISE ( IGNORE ) IN ( SELECT "AAAAAA" . * ORDER BY 
-    REGISTER LIMIT "AAAAAA" . "AAAAAA" OFFSET RAISE ( IGNORE ) NOT NULL )
-  }
-} {1 {invalid name: "RAISE ( IGNORE ) IN ( SELECT "AAAAAA" . * ORDER BY 
-    REGISTER LIMIT "AAAAAA" . "AAAAAA" OFFSET RAISE ( IGNORE ) NOT NULL )"}}
+ifcapable subquery {
+  do_test attach-7.1 {
+    file delete -force test.db test.db-journal
+    sqlite3 db test.db
+    catchsql {
+      DETACH RAISE ( IGNORE ) IN ( SELECT "AAAAAA" . * ORDER BY 
+      REGISTER LIMIT "AAAAAA" . "AAAAAA" OFFSET RAISE ( IGNORE ) NOT NULL )
+    }
+  } {1 {invalid name: "RAISE ( IGNORE ) IN ( SELECT "AAAAAA" . * ORDER BY 
+      REGISTER LIMIT "AAAAAA" . "AAAAAA" OFFSET RAISE ( IGNORE ) NOT NULL )"}}
+}
 finish_test
index c28347e7915b9b38a6976b46875ec2d6cacb1548..328e028c09b26d87b4f0c0d7e2b84ca40c235aa2 100644 (file)
@@ -12,7 +12,7 @@
 # file is a copy of "trans.test" modified to run under autovacuum mode.
 # the point is to stress the autovacuum logic and try to get it to fail.
 #
-# $Id: avtrans.test,v 1.5 2007/08/12 20:07:59 drh Exp $
+# $Id: avtrans.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 
 set testdir [file dirname $argv0]
@@ -909,7 +909,7 @@ for {set i 2} {$i<=$limit} {incr i} {
         } [expr {$i%2==0}]
       } else {
         do_test avtrans-9.$i.5-$cnt {
-           expr {$sqlite_fullsync_count>0}
+           expr {$sqlite_fullsync_count==0}
         } {1}
       }
     }
index 130e772de7ed4ab54c91ba7384f0d317c4416faf..d09c933c1810dbd55486fef6b4e92d53522ac0a0 100644 (file)
@@ -13,7 +13,7 @@
 # This file checks to make sure SQLite is able to gracefully
 # handle malformed UTF-8.
 #
-# $Id: badutf.test,v 1.1 2007/05/15 18:35:21 drh Exp $
+# $Id: badutf.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -41,49 +41,53 @@ do_test badutf-1.7 {
   sqlite3_exec db {SELECT hex('%ff') AS x}
 } {0 {x FF}}
 
-do_test badutf-1.10 {
-  sqlite3 db2 {}
-  db2 eval {PRAGMA encoding=UTF16be}
-  sqlite3_exec db2 {SELECT hex('%80') AS x}
-} {0 {x 0080}}
-do_test badutf-1.11 {
-  sqlite3_exec db2 {SELECT hex('%81') AS x}
-} {0 {x 0081}}
-do_test badutf-1.12 {
-  sqlite3_exec db2 {SELECT hex('%bf') AS x}
-} {0 {x 00BF}}
-do_test badutf-1.13 {
-  sqlite3_exec db2 {SELECT hex('%c0') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.14 {
-  sqlite3_exec db2 {SELECT hex('%c1') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.15 {
-  sqlite3_exec db2 {SELECT hex('%c0%bf') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.16 {
-  sqlite3_exec db2 {SELECT hex('%c1%bf') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.17 {
-  sqlite3_exec db2 {SELECT hex('%c3%bf') AS x}
-} {0 {x 00FF}}
-do_test badutf-1.18 {
-  sqlite3_exec db2 {SELECT hex('%e0') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.19 {
-  sqlite3_exec db2 {SELECT hex('%f0') AS x}
-} {0 {x FFFD}}
-do_test badutf-1.20 {
-  sqlite3_exec db2 {SELECT hex('%ff') AS x}
-} {0 {x FFFD}}
+sqlite3 db2 {}
+ifcapable utf16 {
+  do_test badutf-1.10 {
+    db2 eval {PRAGMA encoding=UTF16be}
+    sqlite3_exec db2 {SELECT hex('%80') AS x}
+  } {0 {x 0080}}
+  do_test badutf-1.11 {
+    sqlite3_exec db2 {SELECT hex('%81') AS x}
+  } {0 {x 0081}}
+  do_test badutf-1.12 {
+    sqlite3_exec db2 {SELECT hex('%bf') AS x}
+  } {0 {x 00BF}}
+  do_test badutf-1.13 {
+    sqlite3_exec db2 {SELECT hex('%c0') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.14 {
+    sqlite3_exec db2 {SELECT hex('%c1') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.15 {
+    sqlite3_exec db2 {SELECT hex('%c0%bf') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.16 {
+    sqlite3_exec db2 {SELECT hex('%c1%bf') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.17 {
+    sqlite3_exec db2 {SELECT hex('%c3%bf') AS x}
+  } {0 {x 00FF}}
+  do_test badutf-1.18 {
+    sqlite3_exec db2 {SELECT hex('%e0') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.19 {
+    sqlite3_exec db2 {SELECT hex('%f0') AS x}
+  } {0 {x FFFD}}
+  do_test badutf-1.20 {
+    sqlite3_exec db2 {SELECT hex('%ff') AS x}
+  } {0 {x FFFD}}
+}
 
 
-do_test badutf-2.1 {
-  sqlite3_exec db {SELECT '%80'=CAST(x'80' AS text) AS x}
-} {0 {x 1}}
-do_test badutf-2.2 {
-  sqlite3_exec db {SELECT CAST('%80' AS blob)=x'80' AS x}
-} {0 {x 1}}
+ifcapable bloblit {
+  do_test badutf-2.1 {
+    sqlite3_exec db {SELECT '%80'=CAST(x'80' AS text) AS x}
+  } {0 {x 1}}
+  do_test badutf-2.2 {
+    sqlite3_exec db {SELECT CAST('%80' AS blob)=x'80' AS x}
+  } {0 {x 1}}
+}
 
 do_test badutf-3.1 {
   sqlite3_exec db {SELECT length('%80') AS x}
index df331fe2b14b5535ddff49c1773b79e5addecfa3..3f036b76d6ca8a4afa0d9c6e91540752adb6d470 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this file is testing that it is OK to create new tables
 # and indices while creating existing tables and indices.
 #
-# $Id: createtab.test,v 1.2 2007/05/04 14:36:22 drh Exp $
+# $Id: createtab.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -45,9 +45,15 @@ for {set av 0} {$av<=$upperBound} {incr av} {
       SELECT count(*) FROM t1;
     }
   } {4}
+
+  set isUtf16 0
+  ifcapable utf16 { 
+    set isUtf16 [expr {[execsql {PRAGMA encoding}] != "UTF-8"}]
+  }
+
   do_test createtab-$av.2 {
     file size test.db
-  } [expr {1024*(4+($av!=0)+([execsql {PRAGMA encoding}]!="UTF-8")*2)}]
+  } [expr {1024*(4+($av!=0)+(${isUtf16}*2))}]
   
   # Start reading the table
   #
index 2df2a2ead68ff559caa6545a77bfe18e536e464c..3149c54276ca914bab3a9795107b400c1376d172 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing built-in functions.
 #
-# $Id: func.test,v 1.68 2007/09/03 11:04:22 danielk1977 Exp $
+# $Id: func.test,v 1.69 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -324,9 +324,11 @@ do_test func-9.5 {
 # generated by randomblob().  So this seems like a good place to test
 # hex().
 #
-do_test func-9.10 {
-  execsql {SELECT hex(x'00112233445566778899aAbBcCdDeEfF')}
-} {00112233445566778899AABBCCDDEEFF}
+ifcapable bloblit {
+  do_test func-9.10 {
+    execsql {SELECT hex(x'00112233445566778899aAbBcCdDeEfF')}
+  } {00112233445566778899AABBCCDDEEFF}
+}
 set encoding [db one {PRAGMA encoding}]
 if {$encoding=="UTF-16le"} {
   do_test func-9.11-utf16le {
@@ -797,15 +799,17 @@ do_test func-21.8 {
   }
 } {0123456789012345678901234567890123456789012345678901234567890123456789}
 
-do_test func-21.9 {
-  # Attempt to exploit a buffer-overflow that at one time existed 
-  # in the REPLACE function. 
-  set ::str "[string repeat A 29998]CC[string repeat A 35537]"
-  set ::rep [string repeat B 65536]
-  execsql {
-    SELECT LENGTH(REPLACE($::str, 'C', $::rep));
-  }
-} [expr 29998 + 2*65536 + 35537]
+ifcapable tclvar {
+  do_test func-21.9 {
+    # Attempt to exploit a buffer-overflow that at one time existed 
+    # in the REPLACE function. 
+    set ::str "[string repeat A 29998]CC[string repeat A 35537]"
+    set ::rep [string repeat B 65536]
+    execsql {
+      SELECT LENGTH(REPLACE($::str, 'C', $::rep));
+    }
+  } [expr 29998 + 2*65536 + 35537]
+}
 
 # Tests for the TRIM, LTRIM and RTRIM functions.
 #
index 35a8a0286c3b78254e296411b0e58809b815bdb2..397b291a767c4af6b19231a2f2364de4bece6400 100644 (file)
@@ -9,13 +9,13 @@
 #
 #***********************************************************************
 #
-# $Id: incrblob_err.test,v 1.7 2007/08/30 11:48:32 danielk1977 Exp $
+# $Id: incrblob_err.test,v 1.8 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
-ifcapable {!incrblob  || !memdebug} {
+ifcapable {!incrblob  || !memdebug || !tclvar} {
   finish_test
   return
 }
index cddecd520a0557cdd410ff32b9760180ddedaed5..825b2acd47888b19fbe5904fac0ea87bb6334150 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing corner cases of the INSERT statement.
 #
-# $Id: insert3.test,v 1.6 2007/04/16 17:07:55 drh Exp $
+# $Id: insert3.test,v 1.7 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -156,13 +156,16 @@ do_test insert3-3.6 {
     SELECT * FROM t5;
   }
 } {1 xyz 2 xyz}
-do_test insert3-3.7 {
-  execsql {
-    CREATE TABLE t6(x,y DEFAULT 4.3, z DEFAULT x'6869');
-    INSERT INTO t6 DEFAULT VALUES;
-    SELECT * FROM t6;
-  }
-} {{} 4.3 hi}
+
+ifcapable bloblit {
+  do_test insert3-3.7 {
+    execsql {
+      CREATE TABLE t6(x,y DEFAULT 4.3, z DEFAULT x'6869');
+      INSERT INTO t6 DEFAULT VALUES;
+      SELECT * FROM t6;
+    }
+  } {{} 4.3 hi}
+}
 db close
 
 finish_test
index 3768f3ca3239c5e6055a17c7892e36f222c302f6..d85fec3e11dc228e9c086d21129a111be64b768b 100644 (file)
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing the INSERT transfer optimization.
 #
-# $Id: insert4.test,v 1.6 2007/09/03 17:30:07 danielk1977 Exp $
+# $Id: insert4.test,v 1.7 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !view||!subquery {
+  finish_test
+  return
+}
+
 # The sqlite3_xferopt_count variable is incremented whenever the 
 # insert transfer optimization applies.
 #
index 89e74b3fc8100b3c38c5ff1721bee8dc3a245429..e883c90ae9f62914ab52a8713037e6e875b4d361 100644 (file)
@@ -13,7 +13,7 @@
 # IO traffic generated by SQLite (making sure SQLite is not writing out
 # more database pages than it has to, stuff like that).
 #
-# $Id: io.test,v 1.9 2007/09/03 17:02:50 drh Exp $
+# $Id: io.test,v 1.10 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -361,40 +361,42 @@ do_test io-2.11.2 {
 # Test cases io-3.* test the IOCAP_SEQUENTIAL optimization.
 #
 sqlite3_simulate_device -char sequential -sectorsize 0
-do_test io-3.1 {
-  db close
-  file delete -force test.db test.db-journal
-  sqlite3 db test.db
-  file size test.db
-} {0}
-do_test io-3.2 {
-  execsql { CREATE TABLE abc(a, b) }
-  nSync
-  execsql {
-    PRAGMA cache_size = 10;
-    BEGIN;
-    INSERT INTO abc VALUES('hello', 'world');
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-    INSERT INTO abc SELECT * FROM abc;
-  }
-  # File has grown - showing there was a cache-spill - but there 
-  # have been no calls to fsync():
-  list [file size test.db] [nSync]
-} {31744 0}
-do_test io-3.3 {
-  # The COMMIT requires a single fsync() - to the database file.
-  execsql { COMMIT }
-  list [file size test.db] [nSync]
-} {39936 1}
+ifcapable pager_pragmas {
+  do_test io-3.1 {
+    db close
+    file delete -force test.db test.db-journal
+    sqlite3 db test.db
+    file size test.db
+  } {0}
+  do_test io-3.2 {
+    execsql { CREATE TABLE abc(a, b) }
+    nSync
+    execsql {
+      PRAGMA cache_size = 10;
+      BEGIN;
+      INSERT INTO abc VALUES('hello', 'world');
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+      INSERT INTO abc SELECT * FROM abc;
+    }
+    # File has grown - showing there was a cache-spill - but there 
+    # have been no calls to fsync():
+    list [file size test.db] [nSync]
+  } {31744 0}
+  do_test io-3.3 {
+    # The COMMIT requires a single fsync() - to the database file.
+    execsql { COMMIT }
+    list [file size test.db] [nSync]
+  } {39936 1}
+}
 
 #----------------------------------------------------------------------
 # Test cases io-4.* test the IOCAP_SAFE_APPEND optimization.
@@ -468,13 +470,15 @@ do_test io-4.3.1 {
   }
   expr {[file size test.db]/1024}
 } {43}
-do_test io-4.3.2 {
-  execsql {
-    PRAGMA synchronous = full;
-    PRAGMA cache_size = 10;
-    PRAGMA synchronous;
-  }
-} {2}
+ifcapable pager_pragmas {
+  do_test io-4.3.2 {
+    execsql {
+      PRAGMA synchronous = full;
+      PRAGMA cache_size = 10;
+      PRAGMA synchronous;
+    }
+  } {2}
+}
 do_test io-4.3.3 {
   execsql {
     BEGIN;
index 31a782fa75963d2e0df3dd35fd138be7a95fd525..ff72f82177b208587622cab1873613f9614d2004 100644 (file)
 # The tests in this file use special facilities that are only
 # available in the SQLite test fixture.
 #
-# $Id: ioerr2.test,v 1.5 2007/05/23 16:23:09 danielk1977 Exp $
+# $Id: ioerr2.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !integrityck {
+  finish_test
+  return
+}
+
 do_test ioerr2-1.1 {
   execsql {
     PRAGMA cache_size = 10;
index 3d0f106af5e462863288cccad8e0358f350557e0..e154ca2e11d0f442a68dfee1b24b152d01d2d539 100644 (file)
@@ -13,7 +13,7 @@
 # in particular the optimizations that occur to help those operators
 # run faster.
 #
-# $Id: like.test,v 1.6 2007/06/11 12:56:15 drh Exp $
+# $Id: like.test,v 1.7 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -389,7 +389,8 @@ do_test like-5.8 {
 #
 do_test like-6.1 {
   foreach x { 'abc 'bcd 'def 'ax } {
-    db eval {INSERT INTO t2 VALUES($x)}
+    set x2 '[string map {' ''} $x]'
+    db eval "INSERT INTO t2 VALUES($x2)"
   }
   execsql {
     SELECT * FROM t2 WHERE x LIKE '''a%'
index 82d3dc7a77f6bfeacd62d910ddc35e9cbe154c54..169ad87f752114e951d9643e84f47eed615a704e 100644 (file)
@@ -16,7 +16,7 @@
 # to see what happens in the library if a malloc were to really fail
 # due to an out-of-memory situation.
 #
-# $Id: malloc.test,v 1.47 2007/09/04 01:25:49 drh Exp $
+# $Id: malloc.test,v 1.48 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -31,26 +31,28 @@ ifcapable !memdebug {
 
 source $testdir/malloc_common.tcl
 
-do_malloc_test 1 -tclprep {
-  db close
-} -tclbody {
-  if {[catch {sqlite3 db test.db}]} {
-    error "out of memory"
-  }
-} -sqlbody {
-  DROP TABLE IF EXISTS t1;
-  CREATE TABLE t1(
-     a int, b float, c double, d text, e varchar(20),
-     primary key(a,b,c)
-  );
-  CREATE INDEX i1 ON t1(a,b);
-  INSERT INTO t1 VALUES(1,2.3,4.5,'hi',x'746865726500');
-  INSERT INTO t1 VALUES(6,7.0,0.8,'hello','out yonder');
-  SELECT * FROM t1;
-  SELECT avg(b) FROM t1 GROUP BY a HAVING b>20.0;
-  DELETE FROM t1 WHERE a IN (SELECT min(a) FROM t1);
-  SELECT count(*) FROM t1;
-} 
+ifcapable bloblit&&subquery {
+  do_malloc_test 1 -tclprep {
+    db close
+  } -tclbody {
+    if {[catch {sqlite3 db test.db}]} {
+      error "out of memory"
+    }
+  } -sqlbody {
+    DROP TABLE IF EXISTS t1;
+    CREATE TABLE t1(
+       a int, b float, c double, d text, e varchar(20),
+       primary key(a,b,c)
+    );
+    CREATE INDEX i1 ON t1(a,b);
+    INSERT INTO t1 VALUES(1,2.3,4.5,'hi',x'746865726500');
+    INSERT INTO t1 VALUES(6,7.0,0.8,'hello','out yonder');
+    SELECT * FROM t1;
+    SELECT avg(b) FROM t1 GROUP BY a HAVING b>20.0;
+    DELETE FROM t1 WHERE a IN (SELECT min(a) FROM t1);
+    SELECT count(*) FROM t1;
+  } 
+}
 
 # Ensure that no file descriptors were leaked.
 do_test malloc-1.X {
@@ -58,25 +60,27 @@ do_test malloc-1.X {
   set sqlite_open_file_count
 } {0}
 
-do_malloc_test 2 -sqlbody {
-  CREATE TABLE t1(a int, b int default 'abc', c int default 1);
-  CREATE INDEX i1 ON t1(a,b);
-  INSERT INTO t1 VALUES(1,1,'99 abcdefghijklmnopqrstuvwxyz');
-  INSERT INTO t1 VALUES(2,4,'98 abcdefghijklmnopqrstuvwxyz');
-  INSERT INTO t1 VALUES(3,9,'97 abcdefghijklmnopqrstuvwxyz');
-  INSERT INTO t1 VALUES(4,16,'96 abcdefghijklmnopqrstuvwxyz');
-  INSERT INTO t1 VALUES(5,25,'95 abcdefghijklmnopqrstuvwxyz');
-  INSERT INTO t1 VALUES(6,36,'94 abcdefghijklmnopqrstuvwxyz');
-  SELECT 'stuff', count(*) as 'other stuff', max(a+10) FROM t1;
-  UPDATE t1 SET b=b||b||b||b;
-  UPDATE t1 SET b=a WHERE a in (10,12,22);
-  INSERT INTO t1(c,b,a) VALUES(20,10,5);
-  INSERT INTO t1 SELECT * FROM t1
-      WHERE a IN (SELECT a FROM t1 WHERE a<10);
-  DELETE FROM t1 WHERE a>=10;
-  DROP INDEX i1;
-  DELETE FROM t1;
-} 
+ifcapable subquery {
+  do_malloc_test 2 -sqlbody {
+    CREATE TABLE t1(a int, b int default 'abc', c int default 1);
+    CREATE INDEX i1 ON t1(a,b);
+    INSERT INTO t1 VALUES(1,1,'99 abcdefghijklmnopqrstuvwxyz');
+    INSERT INTO t1 VALUES(2,4,'98 abcdefghijklmnopqrstuvwxyz');
+    INSERT INTO t1 VALUES(3,9,'97 abcdefghijklmnopqrstuvwxyz');
+    INSERT INTO t1 VALUES(4,16,'96 abcdefghijklmnopqrstuvwxyz');
+    INSERT INTO t1 VALUES(5,25,'95 abcdefghijklmnopqrstuvwxyz');
+    INSERT INTO t1 VALUES(6,36,'94 abcdefghijklmnopqrstuvwxyz');
+    SELECT 'stuff', count(*) as 'other stuff', max(a+10) FROM t1;
+    UPDATE t1 SET b=b||b||b||b;
+    UPDATE t1 SET b=a WHERE a in (10,12,22);
+    INSERT INTO t1(c,b,a) VALUES(20,10,5);
+    INSERT INTO t1 SELECT * FROM t1
+        WHERE a IN (SELECT a FROM t1 WHERE a<10);
+    DELETE FROM t1 WHERE a>=10;
+    DROP INDEX i1;
+    DELETE FROM t1;
+  } 
+}
 
 # Ensure that no file descriptors were leaked.
 do_test malloc-2.X {
@@ -108,23 +112,25 @@ do_test malloc-3.X {
   set sqlite_open_file_count
 } {0}
 
-do_malloc_test 4 -sqlbody {
-  BEGIN TRANSACTION;
-  CREATE TABLE t1(a int, b int, c int);
-  CREATE INDEX i1 ON t1(a,b);
-  INSERT INTO t1 VALUES(1,1,99);
-  INSERT INTO t1 VALUES(2,4,98);
-  INSERT INTO t1 VALUES(3,9,97);
-  INSERT INTO t1 VALUES(4,16,96);
-  INSERT INTO t1 VALUES(5,25,95);
-  INSERT INTO t1 VALUES(6,36,94);
-  UPDATE t1 SET b=a WHERE a in (10,12,22);
-  INSERT INTO t1 SELECT * FROM t1
-     WHERE a IN (SELECT a FROM t1 WHERE a<10);
-  DROP INDEX i1;
-  DELETE FROM t1;
-  COMMIT;
-} 
+ifcapable subquery {
+  do_malloc_test 4 -sqlbody {
+    BEGIN TRANSACTION;
+    CREATE TABLE t1(a int, b int, c int);
+    CREATE INDEX i1 ON t1(a,b);
+    INSERT INTO t1 VALUES(1,1,99);
+    INSERT INTO t1 VALUES(2,4,98);
+    INSERT INTO t1 VALUES(3,9,97);
+    INSERT INTO t1 VALUES(4,16,96);
+    INSERT INTO t1 VALUES(5,25,95);
+    INSERT INTO t1 VALUES(6,36,94);
+    UPDATE t1 SET b=a WHERE a in (10,12,22);
+    INSERT INTO t1 SELECT * FROM t1
+       WHERE a IN (SELECT a FROM t1 WHERE a<10);
+    DROP INDEX i1;
+    DELETE FROM t1;
+    COMMIT;
+  } 
+}
 
 # Ensure that no file descriptors were leaked.
 do_test malloc-4.X {
@@ -132,21 +138,23 @@ do_test malloc-4.X {
   set sqlite_open_file_count
 } {0}
 
-do_malloc_test 5 -sqlbody {
-  BEGIN TRANSACTION;
-  CREATE TABLE t1(a,b);
-  CREATE TABLE t2(x,y);
-  CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
-    INSERT INTO t2(x,y) VALUES(new.rowid,1);
-    INSERT INTO t2(x,y) SELECT * FROM t2;
-    INSERT INTO t2 SELECT * FROM t2;
-    UPDATE t2 SET y=y+1 WHERE x=new.rowid;
-    SELECT 123;
-    DELETE FROM t2 WHERE x=new.rowid;
-  END;
-  INSERT INTO t1(a,b) VALUES(2,3);
-  COMMIT;
-} 
+ifcapable trigger {
+  do_malloc_test 5 -sqlbody {
+    BEGIN TRANSACTION;
+    CREATE TABLE t1(a,b);
+    CREATE TABLE t2(x,y);
+    CREATE TRIGGER r1 AFTER INSERT ON t1 BEGIN
+      INSERT INTO t2(x,y) VALUES(new.rowid,1);
+      INSERT INTO t2(x,y) SELECT * FROM t2;
+      INSERT INTO t2 SELECT * FROM t2;
+      UPDATE t2 SET y=y+1 WHERE x=new.rowid;
+      SELECT 123;
+      DELETE FROM t2 WHERE x=new.rowid;
+    END;
+    INSERT INTO t1(a,b) VALUES(2,3);
+    COMMIT;
+  } 
+}
 
 # Ensure that no file descriptors were leaked.
 do_test malloc-5.X {
@@ -154,25 +162,27 @@ do_test malloc-5.X {
   set sqlite_open_file_count
 } {0}
 
-do_malloc_test 6 -sqlprep {
-  BEGIN TRANSACTION;
-  CREATE TABLE t1(a);
-  INSERT INTO t1 VALUES(1);
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  INSERT INTO t1 SELECT a*2 FROM t1;
-  DELETE FROM t1 where rowid%5 = 0;
-  COMMIT;
-} -sqlbody {
-  VACUUM;
-} 
+ifcapable vacuum {
+  do_malloc_test 6 -sqlprep {
+    BEGIN TRANSACTION;
+    CREATE TABLE t1(a);
+    INSERT INTO t1 VALUES(1);
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    INSERT INTO t1 SELECT a*2 FROM t1;
+    DELETE FROM t1 where rowid%5 = 0;
+    COMMIT;
+  } -sqlbody {
+    VACUUM;
+  } 
+}
 
 do_malloc_test 7 -sqlprep {
   CREATE TABLE t1(a, b);
@@ -198,7 +208,7 @@ do_malloc_test 7 -sqlprep {
 #
 # These tests only run if UTF-16 support is compiled in.
 #
-if {$::sqlite_options(utf16)} {
+ifcapable utf16 {
   set ::STMT {}
   do_malloc_test 8 -tclprep {
     set sql "SELECT '[string repeat abc 20]', '[string repeat def 20]', ?"
@@ -334,20 +344,22 @@ proc string_compare {a b} {
 # Test for malloc() failures in sqlite3_create_collation() and 
 # sqlite3_create_collation16().
 #
-do_malloc_test 15 -start 4 -tclbody {
-  db collate string_compare string_compare
-  if {[catch {add_test_collate db 1 1 1} msg]} {
-    if {$msg=="SQLITE_NOMEM"} {set msg "out of memory"}
-    error $msg
-  }
-
-  db complete {SELECT "hello """||'world"' [microsoft], * FROM anicetable;}
-  db complete {-- Useful comment}
-
-  execsql {
-    CREATE TABLE t1(a, b COLLATE string_compare);
-    INSERT INTO t1 VALUES(10, 'string');
-    INSERT INTO t1 VALUES(10, 'string2');
+ifcapable utf16 {
+  do_malloc_test 15 -start 4 -tclbody {
+    db collate string_compare string_compare
+    if {[catch {add_test_collate db 1 1 1} msg]} {
+      if {$msg=="SQLITE_NOMEM"} {set msg "out of memory"}
+      error $msg
+    }
+  
+    db complete {SELECT "hello """||'world"' [microsoft], * FROM anicetable;}
+    db complete {-- Useful comment}
+  
+    execsql {
+      CREATE TABLE t1(a, b COLLATE string_compare);
+      INSERT INTO t1 VALUES(10, 'string');
+      INSERT INTO t1 VALUES(10, 'string2');
+    }
   }
 }
 
@@ -364,58 +376,62 @@ do_malloc_test 16 -tclbody {
 
 # Test handling of malloc() failures in sqlite3_open16().
 #
-do_malloc_test 17 -tclbody {
-  set DB2 0
-  set STMT 0
-
-  # open database using sqlite3_open16()
-  set filename [encoding convertto unicode test.db]
-  append filename "\x00\x00"
-  set DB2 [sqlite3_open16 $filename -unused]
-  if {0==$DB2} {
-    error "out of memory"
-  }
-
-  # Prepare statement
-  set rc [catch {sqlite3_prepare $DB2 {SELECT * FROM sqlite_master} -1 X} msg]
-  if {$rc} {
-    error [string range $msg 4 end]
-  }
-  set STMT $msg
-
-  # Finalize statement
-  set rc [sqlite3_finalize $STMT]
-  if {$rc!="SQLITE_OK"} {
-    error [sqlite3_errmsg $DB2]
-  }
-  set STMT 0
-
-  # Close database
-  set rc [sqlite3_close $DB2]
-  if {$rc!="SQLITE_OK"} {
-    error [sqlite3_errmsg $DB2]
-  }
-  set DB2 0
-} -cleanup {
-  if {$STMT!="0"} {
-    sqlite3_finalize $STMT
-  }
-  if {$DB2!="0"} {
+ifcapable utf16 {
+  do_malloc_test 17 -tclbody {
+    set DB2 0
+    set STMT 0
+  
+    # open database using sqlite3_open16()
+    set filename [encoding convertto unicode test.db]
+    append filename "\x00\x00"
+    set DB2 [sqlite3_open16 $filename -unused]
+    if {0==$DB2} {
+      error "out of memory"
+    }
+  
+    # Prepare statement
+    set rc [catch {sqlite3_prepare $DB2 {SELECT * FROM sqlite_master} -1 X} msg]
+    if {$rc} {
+      error [string range $msg 4 end]
+    }
+    set STMT $msg
+  
+    # Finalize statement
+    set rc [sqlite3_finalize $STMT]
+    if {$rc!="SQLITE_OK"} {
+      error [sqlite3_errmsg $DB2]
+    }
+    set STMT 0
+  
+    # Close database
     set rc [sqlite3_close $DB2]
+    if {$rc!="SQLITE_OK"} {
+      error [sqlite3_errmsg $DB2]
+    }
+    set DB2 0
+  } -cleanup {
+    if {$STMT!="0"} {
+      sqlite3_finalize $STMT
+    }
+    if {$DB2!="0"} {
+      set rc [sqlite3_close $DB2]
+    }
   }
 }
 
 # Test handling of malloc() failures in sqlite3_errmsg16().
 #
-do_malloc_test 18 -tclbody {
-  catch {
-    db eval "SELECT [string repeat longcolumnname 10] FROM sqlite_master"
-  } msg
-  if {$msg=="out of memory"} {error $msg}
-  set utf16 [sqlite3_errmsg16 [sqlite3_connection_pointer db]]
-  binary scan $utf16 c* bytes
-  if {[llength $bytes]==0} {
-    error "out of memory"
+ifcapable utf16 {
+  do_malloc_test 18 -tclbody {
+    catch {
+      db eval "SELECT [string repeat longcolumnname 10] FROM sqlite_master"
+    } msg
+    if {$msg=="out of memory"} {error $msg}
+    set utf16 [sqlite3_errmsg16 [sqlite3_connection_pointer db]]
+    binary scan $utf16 c* bytes
+    if {[llength $bytes]==0} {
+      error "out of memory"
+    }
   }
 }
 
@@ -470,9 +486,11 @@ do_malloc_test 20 -tclprep {
 
 # Test malloc failure whilst installing a foreign key.
 #
-do_malloc_test 21 -sqlbody {
-  CREATE TABLE abc(a, b, c, FOREIGN KEY(a) REFERENCES abc(b))
-} 
+ifcapable foreignkey {
+  do_malloc_test 21 -sqlbody {
+    CREATE TABLE abc(a, b, c, FOREIGN KEY(a) REFERENCES abc(b))
+  } 
+}
 
 # Test malloc failure in an sqlite3_prepare_v2() call.
 #
index 51ea298bf49ee775638e66033fa50f36274591bd..55b1b498ca15d63d45221b8a73b838ebb3be9e94 100644 (file)
@@ -11,7 +11,7 @@
 # This file contains additional out-of-memory checks (see malloc.tcl)
 # added to expose a bug in out-of-memory handling for sqlite3_value_text()
 #
-# $Id: malloc8.test,v 1.5 2007/09/03 16:12:10 drh Exp $
+# $Id: malloc8.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -59,13 +59,15 @@ do_malloc_test malloc8-3 -sqlprep {
 } -sqlbody {
   SELECT length(a), substr(a, 4, 4) FROM t1;
 }
-do_malloc_test malloc8-4 -sqlprep {
-  PRAGMA encoding='UTF-16';
-  CREATE TABLE t1(a);
-  INSERT INTO t1 
-  VALUES('0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ');
-} -sqlbody {
-  SELECT julianday(a,a) FROM t1;
+ifcapable datetime {
+  do_malloc_test malloc8-4 -sqlprep {
+    PRAGMA encoding='UTF-16';
+    CREATE TABLE t1(a);
+    INSERT INTO t1 
+    VALUES('0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ');
+  } -sqlbody {
+    SELECT julianday(a,a) FROM t1;
+  }
 }
 do_malloc_test malloc8-5 -sqlprep {
   PRAGMA encoding='UTF-16';
index e058c937c08d63baa42d769e6c5ad99d264c7484..8c7705f95e460c9d4b22a6d6cdf44ba65a2534c7 100644 (file)
@@ -10,7 +10,7 @@
 #***********************************************************************
 # This file contains additional out-of-memory checks (see malloc.tcl).
 #
-# $Id: mallocA.test,v 1.5 2007/09/03 16:12:10 drh Exp $
+# $Id: mallocA.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -44,17 +44,19 @@ file copy test.db test.db.bu
 do_malloc_test mallocA-1 -testdb test.db.bu -sqlbody {
   ANALYZE
 }
-do_malloc_test mallocA-2 -testdb test.db.bu -sqlbody {
-  REINDEX;
-}
-do_malloc_test mallocA-3 -testdb test.db.bu -sqlbody {
-  REINDEX t1;
-}
-do_malloc_test mallocA-4 -testdb test.db.bu -sqlbody {
-  REINDEX main.t1;
-}
-do_malloc_test mallocA-5 -testdb test.db.bu -sqlbody {
-  REINDEX nocase;
+ifcapable reindex {
+  do_malloc_test mallocA-2 -testdb test.db.bu -sqlbody {
+    REINDEX;
+  }
+  do_malloc_test mallocA-3 -testdb test.db.bu -sqlbody {
+    REINDEX t1;
+  }
+  do_malloc_test mallocA-4 -testdb test.db.bu -sqlbody {
+    REINDEX main.t1;
+  }
+  do_malloc_test mallocA-5 -testdb test.db.bu -sqlbody {
+    REINDEX nocase;
+  }
 }
 
 # Ensure that no file descriptors were leaked.
index 95574c602a20b786de4c758b282a5087c3514283..e56c8b1b0e496030fcac17d98bd27444aba8d1a5 100644 (file)
@@ -13,7 +13,7 @@
 # that they have little in common.
 #
 #
-# $Id: mallocB.test,v 1.5 2007/09/03 16:12:10 drh Exp $
+# $Id: mallocB.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -32,7 +32,9 @@ do_malloc_test mallocB-1 -sqlbody {SELECT - 456}
 do_malloc_test mallocB-2 -sqlbody {SELECT - 456.1}
 do_malloc_test mallocB-3 -sqlbody {SELECT random()}
 do_malloc_test mallocB-4 -sqlbody {SELECT zeroblob(1000)}
-do_malloc_test mallocB-5 -sqlbody {SELECT * FROM (SELECT 1) GROUP BY 1;}
+ifcapable subquery {
+  do_malloc_test mallocB-5 -sqlbody {SELECT * FROM (SELECT 1) GROUP BY 1;}
+}
 
 # The following test checks that there are no resource leaks following a
 # malloc() failure in sqlite3_set_auxdata().
index b7b20cdcfa7acc1be71ccd989b2d596120b78e1c..5727cd0b99e2522770332326e82820d34f061050 100644 (file)
 # This file tests aspects of the malloc failure while parsing
 # CREATE TABLE statements in auto_vacuum mode.
 #
-# $Id: mallocC.test,v 1.5 2007/09/03 16:12:10 drh Exp $
+# $Id: mallocC.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
 # Only run these tests if memory debugging is turned on.
 #
-ifcapable !memdebug {
+ifcapable !memdebug||!compound {
    puts "Skipping mallocC tests: not compiled with -DSQLITE_MEMDEBUG..."
    finish_test
    return
index 63808d45139b5bb05ad7279711956f354e85e9c5..e9d85edcb210ff02eb03d15274da21cea0eb3efb 100644 (file)
@@ -13,7 +13,7 @@
 # This file implements tests for miscellanous features that were
 # left out of other test files.
 #
-# $Id: misc2.test,v 1.27 2007/04/06 01:03:34 drh Exp $
+# $Id: misc2.test,v 1.28 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -157,201 +157,203 @@ do_test misc2-6.1 {
 # 2006-08-16:  This has changed.  It is now permitted to update
 # the table being SELECTed from within the callback of the query.
 #
-do_test misc2-7.1 {
-  db close
-  file delete -force test.db
-  sqlite3 db test.db
-  execsql {
-    CREATE TABLE t1(x);
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    SELECT * FROM t1;
-  }
-} {1 2 3}
-do_test misc2-7.2 {
-  set rc [catch {
-    db eval {SELECT rowid FROM t1} {} {
-      db eval "DELETE FROM t1 WHERE rowid=$rowid"
+ifcapable tclvar {
+  do_test misc2-7.1 {
+    db close
+    file delete -force test.db
+    sqlite3 db test.db
+    execsql {
+      CREATE TABLE t1(x);
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      SELECT * FROM t1;
     }
-  } msg]
-  lappend rc $msg
-} {0 {}}
-do_test misc2-7.3 {
-  execsql {SELECT * FROM t1}
-} {}
-do_test misc2-7.4 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1 WHERE rowid=$rowid}
+  } {1 2 3}
+  do_test misc2-7.2 {
+    set rc [catch {
+      db eval {SELECT rowid FROM t1} {} {
+        db eval "DELETE FROM t1 WHERE rowid=$rowid"
+      }
+    } msg]
+    lappend rc $msg
+  } {0 {}}
+  do_test misc2-7.3 {
+    execsql {SELECT * FROM t1}
+  } {}
+  do_test misc2-7.4 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
     }
-  }
-  execsql {SELECT * FROM t1}
-} {2 4}
-do_test misc2-7.5 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1 WHERE rowid=$rowid+1}
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1 WHERE rowid=$rowid}
+      }
     }
-  }
-  execsql {SELECT * FROM t1}
-} {1 3}
-do_test misc2-7.6 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1}
+    execsql {SELECT * FROM t1}
+  } {2 4}
+  do_test misc2-7.5 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
     }
-  }
-  execsql {SELECT * FROM t1}
-} {}
-do_test misc2-7.7 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x & 1} {
-      db eval {UPDATE t1 SET x=x+100 WHERE rowid=$rowid}
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1 WHERE rowid=$rowid+1}
+      }
     }
-  }
-  execsql {SELECT * FROM t1}
-} {101 2 103 4}
-do_test misc2-7.8 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x<10} {
-      db eval {INSERT INTO t1 VALUES($x+1)}
+    execsql {SELECT * FROM t1}
+  } {1 3}
+  do_test misc2-7.6 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
     }
-  }
-  execsql {SELECT * FROM t1}
-} {1 2 3 4 5 6 7 8 9 10}
-
-# Repeat the tests 7.1 through 7.8 about but this time do the SELECTs
-# in reverse order so that we exercise the sqlite3BtreePrev() routine
-# instead of sqlite3BtreeNext()
-#
-do_test misc2-7.11 {
-  db close
-  file delete -force test.db
-  sqlite3 db test.db
-  execsql {
-    CREATE TABLE t1(x);
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    SELECT * FROM t1;
-  }
-} {1 2 3}
-do_test misc2-7.12 {
-  set rc [catch {
-    db eval {SELECT rowid FROM t1 ORDER BY rowid DESC} {} {
-      db eval "DELETE FROM t1 WHERE rowid=$rowid"
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1}
+      }
     }
-  } msg]
-  lappend rc $msg
-} {0 {}}
-do_test misc2-7.13 {
-  execsql {SELECT * FROM t1}
-} {}
-do_test misc2-7.14 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1 WHERE rowid=$rowid}
+    execsql {SELECT * FROM t1}
+  } {}
+  do_test misc2-7.7 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
     }
-  }
-  execsql {SELECT * FROM t1}
-} {2 4}
-do_test misc2-7.15 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1 WHERE rowid=$rowid+1}
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x & 1} {
+        db eval {UPDATE t1 SET x=x+100 WHERE rowid=$rowid}
+      }
     }
-  }
-  execsql {SELECT * FROM t1}
-} {1 3}
-do_test misc2-7.16 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
-    if {$x & 1} {
-      db eval {DELETE FROM t1}
+    execsql {SELECT * FROM t1}
+  } {101 2 103 4}
+  do_test misc2-7.8 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
     }
-  }
-  execsql {SELECT * FROM t1}
-} {}
-do_test misc2-7.17 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1 VALUES(1);
-    INSERT INTO t1 VALUES(2);
-    INSERT INTO t1 VALUES(3);
-    INSERT INTO t1 VALUES(4);
-  }
-  db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
-    if {$x & 1} {
-      db eval {UPDATE t1 SET x=x+100 WHERE rowid=$rowid}
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x<10} {
+        db eval {INSERT INTO t1 VALUES($x+1)}
+      }
     }
-  }
-  execsql {SELECT * FROM t1}
-} {101 2 103 4}
-do_test misc2-7.18 {
-  execsql {
-    DELETE FROM t1;
-    INSERT INTO t1(rowid,x) VALUES(10,10);
-  }
-  db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
-    if {$x>1} {
-      db eval {INSERT INTO t1(rowid,x) VALUES($x-1,$x-1)}
+    execsql {SELECT * FROM t1}
+  } {1 2 3 4 5 6 7 8 9 10}
+  
+  # Repeat the tests 7.1 through 7.8 about but this time do the SELECTs
+  # in reverse order so that we exercise the sqlite3BtreePrev() routine
+  # instead of sqlite3BtreeNext()
+  #
+  do_test misc2-7.11 {
+    db close
+    file delete -force test.db
+    sqlite3 db test.db
+    execsql {
+      CREATE TABLE t1(x);
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      SELECT * FROM t1;
     }
-  }
-  execsql {SELECT * FROM t1}
-} {1 2 3 4 5 6 7 8 9 10}
+  } {1 2 3}
+  do_test misc2-7.12 {
+    set rc [catch {
+      db eval {SELECT rowid FROM t1 ORDER BY rowid DESC} {} {
+        db eval "DELETE FROM t1 WHERE rowid=$rowid"
+      }
+    } msg]
+    lappend rc $msg
+  } {0 {}}
+  do_test misc2-7.13 {
+    execsql {SELECT * FROM t1}
+  } {}
+  do_test misc2-7.14 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
+    }
+    db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1 WHERE rowid=$rowid}
+      }
+    }
+    execsql {SELECT * FROM t1}
+  } {2 4}
+  do_test misc2-7.15 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
+    }
+    db eval {SELECT rowid, x FROM t1} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1 WHERE rowid=$rowid+1}
+      }
+    }
+    execsql {SELECT * FROM t1}
+  } {1 3}
+  do_test misc2-7.16 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
+    }
+    db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
+      if {$x & 1} {
+        db eval {DELETE FROM t1}
+      }
+    }
+    execsql {SELECT * FROM t1}
+  } {}
+  do_test misc2-7.17 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1 VALUES(1);
+      INSERT INTO t1 VALUES(2);
+      INSERT INTO t1 VALUES(3);
+      INSERT INTO t1 VALUES(4);
+    }
+    db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
+      if {$x & 1} {
+        db eval {UPDATE t1 SET x=x+100 WHERE rowid=$rowid}
+      }
+    }
+    execsql {SELECT * FROM t1}
+  } {101 2 103 4}
+  do_test misc2-7.18 {
+    execsql {
+      DELETE FROM t1;
+      INSERT INTO t1(rowid,x) VALUES(10,10);
+    }
+    db eval {SELECT rowid, x FROM t1 ORDER BY rowid DESC} {
+      if {$x>1} {
+        db eval {INSERT INTO t1(rowid,x) VALUES($x-1,$x-1)}
+      }
+    }
+    execsql {SELECT * FROM t1}
+  } {1 2 3 4 5 6 7 8 9 10}
+}
 
 db close
 file delete -force test.db
index fcb91942b4cabd921cd7114d9d6e7b055f9b9bc3..86963b2bf5093ce20667d38f5276f10b56aca683 100644 (file)
@@ -13,7 +13,7 @@
 # This file implements tests for miscellanous features that were
 # left out of other test files.
 #
-# $Id: misc5.test,v 1.16 2007/01/03 23:37:29 drh Exp $
+# $Id: misc5.test,v 1.17 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -582,22 +582,24 @@ sqlite3 db test.db
 
 # Ticket #1911
 #
-do_test misc5-9.1 {
-  execsql {
-    SELECT name, type FROM sqlite_master WHERE name IS NULL
-    UNION
-    SELECT type, name FROM sqlite_master WHERE type IS NULL
-    ORDER BY 1, 2, 1, 2, 1, 2
-  }
-} {}
-do_test misc5-9.2 {
-  execsql {
-    SELECT name, type FROM sqlite_master WHERE name IS NULL
-    UNION
-    SELECT type, name FROM sqlite_master WHERE type IS NULL
-    ORDER BY 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
-  }
-} {}
+ifcapable compound {
+  do_test misc5-9.1 {
+    execsql {
+      SELECT name, type FROM sqlite_master WHERE name IS NULL
+      UNION
+      SELECT type, name FROM sqlite_master WHERE type IS NULL
+      ORDER BY 1, 2, 1, 2, 1, 2
+    }
+  } {}
+  do_test misc5-9.2 {
+    execsql {
+      SELECT name, type FROM sqlite_master WHERE name IS NULL
+      UNION
+      SELECT type, name FROM sqlite_master WHERE type IS NULL
+      ORDER BY 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
+    }
+  } {}
+}
 
 # Ticket #1912.  Make the tokenizer require a space after a numeric
 # literal.
index 40beb529e5d9ad5419a76b530e3becbb326cfc55..faf04c0827d2a41ee6f20074538bc8df3eb0a1c6 100644 (file)
@@ -12,7 +12,7 @@
 #
 # This file implements tests for the PRAGMA command.
 #
-# $Id: pragma2.test,v 1.2 2007/06/27 10:20:01 drh Exp $
+# $Id: pragma2.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -24,7 +24,7 @@ source $testdir/tester.tcl
 # pragma2-3.*: Test trying to write to the freelist_count is a no-op.
 #
 
-ifcapable !pragma {
+ifcapable !pragma||!schema_pragmas {
   finish_test
   return
 }
index a26d96f2e4ab6c377d9399e979394f5b01a32cfb..69bc1935136bd194a5bc045621016361498c4905 100644 (file)
 #     sqlite3_value_bytes()
 #     sqlite3_value_bytes16()
 #
-# $Id: ptrchng.test,v 1.1 2007/04/27 17:16:22 drh Exp $
+# $Id: ptrchng.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !bloblit {
+  finish_test
+  return
+}
+
 # Register the "pointer_change" SQL function.
 #
 sqlite3_create_function db
index 9d4c1b5bacfbefd8680089acd92d9384d2967cd0..b0047d634c3f6e8700d31ed8c61b0000e2e3b451 100644 (file)
@@ -13,7 +13,7 @@
 # caused by an ON CONFLICT ROLLBACK clause aborts any other pending
 # statements.
 #
-# $Id: rollback.test,v 1.5 2007/08/30 02:26:54 drh Exp $
+# $Id: rollback.test,v 1.6 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -58,17 +58,17 @@ ifcapable conflict {
   
   # Try to continue with the SELECT statement
   #
-btree_breakpoint
   do_test rollback-1.5 {
     sqlite3_step $STMT
   } {SQLITE_ERROR}
+
+  # Restart the SELECT statement
+  #
+  do_test rollback-1.6 { sqlite3_reset $STMT } {SQLITE_ABORT}
+} else {
+  do_test rollback-1.6 { sqlite3_reset $STMT } {SQLITE_OK}
 }
 
-# Restart the SELECT statement
-#
-do_test rollback-1.6 {
-  sqlite3_reset $STMT
-} {SQLITE_ABORT}
 do_test rollback-1.7 {
   sqlite3_step $STMT
 } {SQLITE_ROW}
index 69a67f155581634528aef0b7b0dee40706375ee3..3837c8822f1779878efbcda75e1959696183725e 100644 (file)
@@ -10,7 +10,7 @@
 # focus of this file is testing compute SELECT statements and nested
 # views.
 #
-# $Id: select7.test,v 1.10 2007/06/07 10:55:36 drh Exp $
+# $Id: select7.test,v 1.11 2007/09/12 17:01:45 danielk1977 Exp $
 
 
 set testdir [file dirname $argv0]
@@ -138,20 +138,22 @@ ifcapable {subquery && compound} {
 # Verify that an error occurs if you have too many terms on a
 # compound select statement.
 #
-if {$SQLITE_MAX_COMPOUND_SELECT>0} {
-  set sql {SELECT 0}
-  set result 0
-  for {set i 1} {$i<$SQLITE_MAX_COMPOUND_SELECT} {incr i} {
-    append sql " UNION ALL SELECT $i"
-    lappend result $i
+ifcapable compound {
+  if {$SQLITE_MAX_COMPOUND_SELECT>0} {
+    set sql {SELECT 0}
+    set result 0
+    for {set i 1} {$i<$SQLITE_MAX_COMPOUND_SELECT} {incr i} {
+      append sql " UNION ALL SELECT $i"
+      lappend result $i
+    }
+    do_test select7-6.1 {
+      catchsql $sql
+    } [list 0 $result]
+    append sql { UNION ALL SELECT 99999999}
+    do_test select7-6.2 {
+      catchsql $sql
+    } {1 {too many terms in compound SELECT}}
   }
-  do_test select7-6.1 {
-    catchsql $sql
-  } [list 0 $result]
-  append sql { UNION ALL SELECT 99999999}
-  do_test select7-6.2 {
-    catchsql $sql
-  } {1 {too many terms in compound SELECT}}
 }
 
 finish_test
index bbacd119771543f25e1a6b9bf57a50b122487215..a69774f888584c47f5a99b069db6654ee70b0a2d 100644 (file)
@@ -9,7 +9,7 @@
 #
 #***********************************************************************
 #
-# $Id: shared.test,v 1.26 2007/09/01 16:16:16 danielk1977 Exp $
+# $Id: shared.test,v 1.27 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -865,14 +865,16 @@ do_test shared-$av.11.11 {
 
 # This tests that if it is impossible to free any pages, SQLite will
 # exceed the limit set by PRAGMA cache_size.
-do_test shared-$av.12.1 {
-  file delete -force test.db test.db-journal
-  sqlite3 db test.db 
-  execsql {
-    PRAGMA cache_size = 10;
-    PRAGMA cache_size;
-  }
-} {10}
+file delete -force test.db test.db-journal
+sqlite3 db test.db 
+ifcapable pager_pragmas {
+  do_test shared-$av.12.1 {
+    execsql {
+      PRAGMA cache_size = 10;
+      PRAGMA cache_size;
+    }
+  } {10}
+}
 do_test shared-$av.12.2 {
   set ::db_handles [list]
   for {set i 1} {$i < 15} {incr i} {
index 97f5aac34d16c6f82720f249fef6549a756a9b41..62b9251bd2c68ea8a70689ae69a9c8d2d679ddb3 100644 (file)
 # A database corruption bug that occurs in auto_vacuum mode when
 # the soft_heap_limit is set low enough to be triggered.
 #
-# $Id: softheap1.test,v 1.2 2007/08/12 20:07:59 drh Exp $
+# $Id: softheap1.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $
 
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !integrityck {
+  finish_test
+  return
+}
+
 sqlite3_soft_heap_limit 5000
 do_test softheap1-1.1 {
   execsql {
index 0f8f2a84f21708e8e694aa4e5e86a4c5e9775ec1..b43cfaabe48c246f0d04bed9cdd6a5c401a3b2cf 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this script is testing that the overflow-page related
 # enhancements added after version 3.3.17 speed things up.
 #
-# $Id: speed3.test,v 1.3 2007/08/22 02:56:44 drh Exp $
+# $Id: speed3.test,v 1.4 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 #---------------------------------------------------------------------
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
+
+ifcapable !tclvar {
+  finish_test
+  return
+}
+
 speed_trial_init speed1
 
 # Set a uniform random seed
index 8dc4addbac6795e28f7f214d9ea50a66bc7f2cd2..6fae6cd605fa2dd79f0017aa4bafecc72b3acaff 100644 (file)
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing the built-in SUBSTR() functions.
 #
-# $Id: substr.test,v 1.1 2007/05/15 01:13:47 drh Exp $
+# $Id: substr.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !tclvar {
+  finish_test
+  return
+}
+
 # Create a table to work with.
 #
 execsql { 
index 41d23d875be4e40ac81ea10d292b024c2a823daf..1738291af0a9dcf8804f0f48dc68c2d9336a9807 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this file is testing the sqlite_exec_printf() and
 # sqlite_get_table_printf() APIs.
 #
-# $Id: tableapi.test,v 1.12 2007/01/05 00:14:28 drh Exp $
+# $Id: tableapi.test,v 1.13 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -206,9 +206,11 @@ do_test tableapi-5.2 {
   sqlite3_get_table_printf $::dbx {SELECT * FROM t2} {}
 } {0 2 100 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40 x41 x42 x43 x44 x45 x46 x47 x48 x49 x50 x51 x52 x53 x54 x55 x56 x57 x58 x59 x60 x61 x62 x63 x64 x65 x66 x67 x68 x69 x70 x71 x72 x73 x74 x75 x76 x77 x78 x79 x80 x81 x82 x83 x84 x85 x86 x87 x88 x89 x90 x91 x92 x93 x94 x95 x96 x97 x98 x99 x100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100}
 
-do_test tableapi-6.1 {
-  sqlite3_get_table_printf $::dbx {PRAGMA user_version} {}
-} {0 1 1 user_version 0}
+ifcapable schema_pragmas {
+  do_test tableapi-6.1 {
+    sqlite3_get_table_printf $::dbx {PRAGMA user_version} {}
+  } {0 1 1 user_version 0}
+}
 
 do_test tableapi-99.0 {
   sqlite3_close $::dbx
index 8045cb8beb8027c29a93bd24e49e528b61ea775d..50bdf63beb33c55289dd1998bfb43bf40a5c456d 100644 (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.61 2007/09/01 06:51:28 danielk1977 Exp $
+# $Id: tclsqlite.test,v 1.62 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -460,35 +460,37 @@ do_test tcl-12.1 {
 # of $aaa, that objects are treated as bytearray and are inserted
 # as BLOBs.
 #
-do_test tcl-13.1 {
-  db eval {CREATE TABLE t5(x BLOB)}
-  set x abc123
-  db eval {INSERT INTO t5 VALUES($x)}
-  db eval {SELECT typeof(x) FROM t5}
-} {text}
-do_test tcl-13.2 {
-  binary scan $x H notUsed
-  db eval {
-    DELETE FROM t5;
-    INSERT INTO t5 VALUES($x);
-    SELECT typeof(x) FROM t5;
-  }
-} {text}
-do_test tcl-13.3 {
-  db eval {
-    DELETE FROM t5;
-    INSERT INTO t5 VALUES(@x);
-    SELECT typeof(x) FROM t5;
-  }
-} {blob}
-do_test tcl-13.4 {
-  set y 1234
-  db eval {
-    DELETE FROM t5;
-    INSERT INTO t5 VALUES(@y);
-    SELECT hex(x), typeof(x) FROM t5
-  }
-} {31323334 blob}
+ifcapable tclvar {
+  do_test tcl-13.1 {
+    db eval {CREATE TABLE t5(x BLOB)}
+    set x abc123
+    db eval {INSERT INTO t5 VALUES($x)}
+    db eval {SELECT typeof(x) FROM t5}
+  } {text}
+  do_test tcl-13.2 {
+    binary scan $x H notUsed
+    db eval {
+      DELETE FROM t5;
+      INSERT INTO t5 VALUES($x);
+      SELECT typeof(x) FROM t5;
+    }
+  } {text}
+  do_test tcl-13.3 {
+    db eval {
+      DELETE FROM t5;
+      INSERT INTO t5 VALUES(@x);
+      SELECT typeof(x) FROM t5;
+    }
+  } {blob}
+  do_test tcl-13.4 {
+    set y 1234
+    db eval {
+      DELETE FROM t5;
+      INSERT INTO t5 VALUES(@y);
+      SELECT hex(x), typeof(x) FROM t5
+    }
+  } {31323334 blob}
+}
 
 
 finish_test
index f572817a35f7111f2e8dfaadf463c1f496f66a67..a40659ff84d3f47f9dc23c2f49e444182b00d1f4 100644 (file)
 # fixed.  
 #
 #
-# $Id: tkt2141.test,v 1.1 2007/01/04 01:20:29 drh Exp $
+# $Id: tkt2141.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !subquery {
+  finish_test
+  return
+}
 
 do_test tkt2141-1.1 {
   execsql {
index 7d0e354874a0b6880242a8c871a86ad43b2e24f7..97b5152378168ce974b5246091889e73046d2f1a 100644 (file)
 # fixed.  
 #
 #
-# $Id: tkt2192.test,v 1.1 2007/01/26 19:04:00 drh Exp $
+# $Id: tkt2192.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !datetime {
+  finish_test
+  return
+}
 
 do_test tkt2191-1.1 {
   execsql {
index 633132f999b0a43b4b2e83d20607faed8681ba7b..799b7d69adeb5e06d2b90bafc9d8cceb2f1fdb5e 100644 (file)
 # raw OP_Column in all places where a table column is extracted from
 # the database.
 #
-# $Id: tkt2251.test,v 1.1 2007/02/24 15:18:51 drh Exp $
+# $Id: tkt2251.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !altertable {
+  finish_test
+  return
+}
+
 # Create sample data.  Verify that the default value and type of an added
 # column is correct for aggregates.
 do_test tkt2251-1.1 {
index c012a159757b3f3e50eb5172f918d5535e6a86c8..2d09dda6e3aae1ffcdcfd19f24d7bbbdcb3a6304 100644 (file)
@@ -9,13 +9,13 @@
 #
 #***********************************************************************
 #
-# $Id: tkt2332.test,v 1.3 2007/05/04 19:03:03 danielk1977 Exp $
+# $Id: tkt2332.test,v 1.4 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
-ifcapable {!incrblob} {
+ifcapable !incrblob||!tclvar {
   finish_test
   return
 }
index 5fb6cd122ea586ec0002305917dd2d00cb4936ea..41acd377ce64d9df855ccc75dd3fc9c22690dc75 100644 (file)
@@ -9,12 +9,17 @@
 #
 #***********************************************************************
 #
-# $Id: tkt2339.test,v 1.1 2007/05/06 20:04:25 drh Exp $
+# $Id: tkt2339.test,v 1.2 2007/09/12 17:01:45 danielk1977 Exp $
 #
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !subquery||!compound {
+  finish_test
+  return
+}
+
 do_test tkt2339.1 {
   execsql {
     create table t1(num int);
index c83cc2adfd45bd42dffaefca0c48cccf706d00dd..54e82652fad9adfb716c681397d22fc24598e4b6 100644 (file)
@@ -16,7 +16,7 @@
 # any statement other than a COMMIT, an I/O error is returned instead
 # of SQLITE_BUSY.
 #
-# $Id: tkt2409.test,v 1.2 2007/06/15 12:41:02 drh Exp $
+# $Id: tkt2409.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $
 
 # Test Outline:
 #
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !pager_pragmas {
+  finish_test
+  return
+}
+
 sqlite3_extended_result_codes $::DB 1
 
 # Aquire a read-lock on the database using handle [db2].
index 2c6e1b4d0c4f040ddb81ed851039258e197cdfe4..a078e13b67ff610fbbae51dca03a2dc136dc0e08 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this script is database locks.
 #
-# $Id: trans.test,v 1.36 2007/07/13 10:36:48 drh Exp $
+# $Id: trans.test,v 1.37 2007/09/12 17:01:45 danielk1977 Exp $
 
 
 set testdir [file dirname $argv0]
@@ -908,7 +908,7 @@ for {set i 2} {$i<=$limit} {incr i} {
         } [expr {$i%2==0}]
       } else {
         do_test trans-9.$i.5-$cnt {
-          expr {$sqlite_fullsync_count>0}
+          expr {$sqlite_fullsync_count==0}
         } {1}
       }
     }
index d2f4450c294fd76885685e0a972599d731125196..bff3ef68f74d6a84a179fa6f4b13ab33b47a14bd 100644 (file)
@@ -12,7 +12,7 @@
 # focus of this file is testing the use of indices in WHERE clauses
 # based on recent changes to the optimizer.
 #
-# $Id: where2.test,v 1.11 2007/02/23 23:13:34 drh Exp $
+# $Id: where2.test,v 1.12 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -328,37 +328,41 @@ do_test where2-6.11.4 {
     SELECT * FROM t2249b CROSS JOIN t2249a WHERE a='hello' OR b=a;
   }
 } {123 0123 nosort t2249b {} t2249a {}}
-do_test where2-6.12 {
-  # In this case, the +b disables the affinity conflict and allows
-  # the OR optimization to be used again.  The result is now an empty
-  # set, the same as in where2-6.9.
-  queryplan {
-    SELECT * FROM t2249b CROSS JOIN t2249a WHERE a=+b OR a='hello';
-  }
-} {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.12.2 {
-  # In this case, the +b disables the affinity conflict and allows
-  # the OR optimization to be used again.  The result is now an empty
-  # set, the same as in where2-6.9.
-  queryplan {
-    SELECT * FROM t2249b CROSS JOIN t2249a WHERE a='hello' OR +b=a;
-  }
-} {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.12.3 {
-  # In this case, the +b disables the affinity conflict and allows
-  # the OR optimization to be used again.  The result is now an empty
-  # set, the same as in where2-6.9.
-  queryplan {
-    SELECT * FROM t2249b CROSS JOIN t2249a WHERE +b=a OR a='hello';
-  }
-} {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.13 {
-  # The addition of +a on the second term disabled the OR optimization.
-  # But we should still get the same empty-set result as in where2-6.9.
-  queryplan {
-    SELECT * FROM t2249b CROSS JOIN t2249a WHERE a=+b OR +a='hello';
-  }
-} {nosort t2249b {} t2249a {}}
+ifcapable explain {
+  do_test where2-6.12 {
+    # In this case, the +b disables the affinity conflict and allows
+    # the OR optimization to be used again.  The result is now an empty
+    # set, the same as in where2-6.9.
+    queryplan {
+      SELECT * FROM t2249b CROSS JOIN t2249a WHERE a=+b OR a='hello';
+    }
+  } {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
+  do_test where2-6.12.2 {
+    # In this case, the +b disables the affinity conflict and allows
+    # the OR optimization to be used again.  The result is now an empty
+    # set, the same as in where2-6.9.
+    queryplan {
+      SELECT * FROM t2249b CROSS JOIN t2249a WHERE a='hello' OR +b=a;
+    }
+  } {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
+}
+ifcapable explain {
+  do_test where2-6.12.3 {
+    # In this case, the +b disables the affinity conflict and allows
+    # the OR optimization to be used again.  The result is now an empty
+    # set, the same as in where2-6.9.
+    queryplan {
+      SELECT * FROM t2249b CROSS JOIN t2249a WHERE +b=a OR a='hello';
+    }
+  } {nosort t2249b {} {} sqlite_autoindex_t2249a_1}
+  do_test where2-6.13 {
+    # The addition of +a on the second term disabled the OR optimization.
+    # But we should still get the same empty-set result as in where2-6.9.
+    queryplan {
+      SELECT * FROM t2249b CROSS JOIN t2249a WHERE a=+b OR +a='hello';
+    }
+  } {nosort t2249b {} t2249a {}}
+}
 
 # Variations on the order of terms in a WHERE clause in order
 # to make sure the OR optimizer can recognize them all.
@@ -367,21 +371,23 @@ do_test where2-6.20 {
     SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE x.a=y.a
   }
 } {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.21 {
-  queryplan {
-    SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE x.a=y.a OR y.a='hello'
-  }
-} {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.22 {
-  queryplan {
-    SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE y.a=x.a OR y.a='hello'
-  }
-} {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
-do_test where2-6.23 {
-  queryplan {
-    SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE y.a='hello' OR x.a=y.a
-  }
-} {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
+ifcapable explain {
+  do_test where2-6.21 {
+    queryplan {
+      SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE x.a=y.a OR y.a='hello'
+    }
+  } {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
+  do_test where2-6.22 {
+    queryplan {
+      SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE y.a=x.a OR y.a='hello'
+    }
+  } {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
+  do_test where2-6.23 {
+    queryplan {
+      SELECT * FROM t2249a x CROSS JOIN t2249a y WHERE y.a='hello' OR x.a=y.a
+    }
+  } {0123 0123 nosort x {} {} sqlite_autoindex_t2249a_1}
+}
 
 # Unique queries (queries that are guaranteed to return only a single
 # row of result) do not call the sorter.  But all tables must give
@@ -580,7 +586,7 @@ ifcapable subquery {
 # Make sure WHERE clauses of the form A=1 AND (B=2 OR B=3) are optimized
 # when we have an index on A and B.
 #
-ifcapable or_opt {
+ifcapable or_opt&&tclvar {
   do_test where2-9.1 {
     execsql {
       BEGIN;
index a5405e17703430f4d762c53c9298ade04f39eb94..7abbc1d2e068aade3c07a2de7d67f23242c9ed7d 100644 (file)
 # that IS NULL phrases are correctly optimized.  But you can never
 # have too many tests, so some other tests are thrown in as well.
 #
-# $Id: where4.test,v 1.4 2007/06/02 07:54:38 danielk1977 Exp $
+# $Id: where4.test,v 1.5 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
 
+ifcapable !tclvar||!bloblit {
+  finish_test
+  return
+}
+
 # Build some test data
 #
 do_test where4-1.0 {
index d1884cc75423c95f23ad1089f4725ea18587b7e0..04a6f6380b44ac8fd4f0b740011fa4104e3b7077 100644 (file)
@@ -13,7 +13,7 @@
 # including the sqlite3_bind_zeroblob(), sqlite3_result_zeroblob(),
 # and the built-in zeroblob() SQL function.
 #
-# $Id: zeroblob.test,v 1.9 2007/09/04 12:18:42 drh Exp $
+# $Id: zeroblob.test,v 1.10 2007/09/12 17:01:45 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -110,23 +110,27 @@ do_test zeroblob-2.2 {
 
 # DISTINCT works for zeroblobs
 #
-do_test zeroblob-3.1 {
-  execsql {
-    SELECT count(DISTINCT a) FROM (
-      SELECT x'00000000000000000000' AS a
-      UNION ALL
-      SELECT zeroblob(10) AS a
-    )
-  }
-} {1}
+ifcapable bloblit&&subquery&&compound {
+  do_test zeroblob-3.1 {
+    execsql {
+      SELECT count(DISTINCT a) FROM (
+        SELECT x'00000000000000000000' AS a
+        UNION ALL
+        SELECT zeroblob(10) AS a
+      )
+    }
+  } {1}
+}
 
 # Concatentation works with zeroblob
 #
-do_test zeroblob-4.1 {
-  execsql {
-    SELECT hex(zeroblob(2) || x'61')
-  }
-} {000061}
+ifcapable bloblit {
+  do_test zeroblob-4.1 {
+    execsql {
+      SELECT hex(zeroblob(2) || x'61')
+    }
+  } {000061}
+}
 
 # Check various CAST(...) operations on zeroblob.
 #