From 50a1c56a2e466eb45db9e67510ee193f2fa7ff65 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 15 Aug 2011 12:58:23 +0000 Subject: [PATCH] Update some test cases to work with sqlite_stat3 instead of sqlite_stat2. FossilOrigin-Name: 2504bcfb0cf14b5ce51db0af1269ac28384714e0 --- manifest | 20 ++++++++++---------- manifest.uuid | 2 +- test/alter.test | 1 + test/analyze3.test | 30 +++++++++++++++--------------- test/analyze6.test | 2 +- test/tkt-cbd054fa6b.test | 6 +++--- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/manifest b/manifest index 4ef9e851b5..6e35346e9a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\scouple\sof\stypos\sin\scomments\sin\sanalyze.c. -D 2011-08-15T12:02:21.660 +C Update\ssome\stest\scases\sto\swork\swith\ssqlite_stat3\sinstead\sof\ssqlite_stat2. +D 2011-08-15T12:58:23.538 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 1e6988b3c11dee9bd5edc0c804bd4468d74a9cdc F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -255,17 +255,17 @@ F test/8_3_names.test 631ea964a3edb091cf73c3b540f6bcfdb36ce823 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 F test/all.test 52fc8dee494092031a556911d404ca30a749a30b -F test/alter.test 5314fc01ef51ab8af0b8890725b710ed48d4806b +F test/alter.test 54912d932309df2e4f62aeb47169c2ff740e53ed F test/alter2.test 7ea05c7d92ac99349a802ef7ada17294dd647060 F test/alter3.test 49c9d9fba2b8fcdce2dedeca97bbf1f369cc548d F test/alter4.test b2debc14d8cbe4c1d12ccd6a41eef88a8c1f15d5 F test/altermalloc.test e81ac9657ed25c6c5bb09bebfa5a047cd8e4acfc F test/analyze.test f8ab7d15858b4093b06caf5e57e2a5ff7104bdae F test/analyze2.test 8f2b1534d43f5547ce9a6b736c021d4192c75be3 -F test/analyze3.test d5e4da00a37b927d83aead50626c254a785c111f +F test/analyze3.test 7bcadc47589fd730f9a12ffc9b30a520d7f6931b F test/analyze4.test 757b37875cf9bb528d46f74497bc789c88365045 F test/analyze5.test 713354664c5ff1853ab2cbcb740f0cf5cb7c802e -F test/analyze6.test c125622a813325bba1b4999040ddc213773c2290 +F test/analyze6.test bd3625806a5ee6f7bef72d06295bd319f0290af2 F test/analyze7.test d3587aa5af75c9048d031b94fceca2534fa75d1d F test/async.test 1d0e056ba1bb9729283a0f22718d3a25e82c277b F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b @@ -734,7 +734,7 @@ F test/tkt-9d68c883.test 458f7d82a523d7644b54b497c986378a7d8c8b67 F test/tkt-b351d95f9.test d14a503c414c5c58fdde3e80f9a3cfef986498c0 F test/tkt-b72787b1.test e6b62b2b2785c04d0d698d6a603507e384165049 F test/tkt-bd484a090c.test 60460bf946f79a79712b71f202eda501ca99b898 -F test/tkt-cbd054fa6b.test f14f97ea43662e6f70c9e63287081e8be5d9d589 +F test/tkt-cbd054fa6b.test bd9fb546f63bc0c79d1776978d059fa51c5b1c63 F test/tkt-d11f09d36e.test fb44f7961aa6d4b632fb7b9768239832210b5fc7 F test/tkt-d635236375.test 9d37e988b47d87505bc9445be0ca447002df5d09 F test/tkt-d82e3f3721.test 731359dfdcdb36fea0559cd33fec39dd0ceae8e6 @@ -958,7 +958,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5 F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings.sh 2ebae31e1eb352696f3c2f7706a34c084b28c262 -P 89b2f70884cad0abdf4c66cb64ecddb2820ded74 -R 9884d3dd8105ab98ebe71de1c72e2a2b -U dan -Z b401be2988daefedc016cbb2d3ab24a6 +P ae31dc67aa0637150f964de31a6da6f5797b462a +R db03066face0c75eaaff8230204f24b2 +U drh +Z 4658be3708d6f87baa530d35bdb7827f diff --git a/manifest.uuid b/manifest.uuid index 5d52dcb26d..fd01eb5171 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ae31dc67aa0637150f964de31a6da6f5797b462a \ No newline at end of file +2504bcfb0cf14b5ce51db0af1269ac28384714e0 \ No newline at end of file diff --git a/test/alter.test b/test/alter.test index 4d5a484b2e..e915d26c50 100644 --- a/test/alter.test +++ b/test/alter.test @@ -847,6 +847,7 @@ set system_table_list {1 sqlite_master} catchsql ANALYZE ifcapable analyze { lappend system_table_list 2 sqlite_stat1 } ifcapable stat2 { lappend system_table_list 3 sqlite_stat2 } +ifcapable stat3 { lappend system_table_list 4 sqlite_stat3 } foreach {tn tbl} $system_table_list { do_test alter-15.$tn.1 { diff --git a/test/analyze3.test b/test/analyze3.test index 2c8e42d607..9ac15c4680 100644 --- a/test/analyze3.test +++ b/test/analyze3.test @@ -17,7 +17,7 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -ifcapable !stat2 { +ifcapable !stat3 { finish_test return } @@ -100,7 +100,7 @@ do_eqp_test analyze3-1.1.2 { } {0 0 0 {SEARCH TABLE t1 USING INDEX i1 (x>? AND x0 AND x<1100 -} {0 0 0 {SEARCH TABLE t1 USING INDEX i1 (x>? and x? AND x200 AND x<300 } @@ -117,17 +117,17 @@ do_test analyze3-1.1.6 { } {199 0 14850} do_test analyze3-1.1.7 { sf_execsql { SELECT sum(y) FROM t1 WHERE x>0 AND x<1100 } -} {999 999 499500} +} {2000 0 499500} do_test analyze3-1.1.8 { set l [string range "0" 0 end] set u [string range "1100" 0 end] sf_execsql { SELECT sum(y) FROM t1 WHERE x>$l AND x<$u } -} {999 999 499500} +} {2000 0 499500} do_test analyze3-1.1.9 { set l [expr int(0)] set u [expr int(1100)] sf_execsql { SELECT sum(y) FROM t1 WHERE x>$l AND x<$u } -} {999 999 499500} +} {2000 0 499500} # The following tests are similar to the block above. The difference is @@ -146,10 +146,10 @@ do_test analyze3-1.2.1 { } {} do_eqp_test analyze3-1.2.2 { SELECT sum(y) FROM t2 WHERE x>1 AND x<2 -} {0 0 0 {SEARCH TABLE t2 USING INDEX i2 (x>? AND x? AND x0 AND x<99 -} {0 0 0 {SCAN TABLE t2 (~111 rows)}} +} {0 0 0 {SEARCH TABLE t2 USING INDEX i2 (x>? AND x12 AND x<20 } } {161 0 4760} @@ -165,17 +165,17 @@ do_test analyze3-1.2.6 { } {161 0 integer integer 4760} do_test analyze3-1.2.7 { sf_execsql { SELECT sum(y) FROM t2 WHERE x>0 AND x<99 } -} {999 999 490555} +} {1981 0 490555} do_test analyze3-1.2.8 { set l [string range "0" 0 end] set u [string range "99" 0 end] sf_execsql {SELECT typeof($l), typeof($u), sum(y) FROM t2 WHERE x>$l AND x<$u} -} {999 999 text text 490555} +} {1981 0 text text 490555} do_test analyze3-1.2.9 { set l [expr int(0)] set u [expr int(99)] sf_execsql {SELECT typeof($l), typeof($u), sum(y) FROM t2 WHERE x>$l AND x<$u} -} {999 999 integer integer 490555} +} {1981 0 integer integer 490555} # Same tests a third time. This time, column x has INTEGER affinity and # is not the leftmost column of the table. This triggered a bug causing @@ -193,10 +193,10 @@ do_test analyze3-1.3.1 { } {} do_eqp_test analyze3-1.3.2 { SELECT sum(y) FROM t3 WHERE x>200 AND x<300 -} {0 0 0 {SEARCH TABLE t3 USING INDEX i3 (x>? AND x? AND x0 AND x<1100 -} {0 0 0 {SCAN TABLE t3 (~111 rows)}} +} {0 0 0 {SEARCH TABLE t3 USING INDEX i3 (x>? AND x200 AND x<300 } @@ -213,17 +213,17 @@ do_test analyze3-1.3.6 { } {199 0 14850} do_test analyze3-1.3.7 { sf_execsql { SELECT sum(y) FROM t3 WHERE x>0 AND x<1100 } -} {999 999 499500} +} {2000 0 499500} do_test analyze3-1.3.8 { set l [string range "0" 0 end] set u [string range "1100" 0 end] sf_execsql { SELECT sum(y) FROM t3 WHERE x>$l AND x<$u } -} {999 999 499500} +} {2000 0 499500} do_test analyze3-1.3.9 { set l [expr int(0)] set u [expr int(1100)] sf_execsql { SELECT sum(y) FROM t3 WHERE x>$l AND x<$u } -} {999 999 499500} +} {2000 0 499500} #------------------------------------------------------------------------- # Test that the values of bound SQL variables may be used for the LIKE diff --git a/test/analyze6.test b/test/analyze6.test index b090b5b091..74b7ec7984 100644 --- a/test/analyze6.test +++ b/test/analyze6.test @@ -17,7 +17,7 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -ifcapable !stat2 { +ifcapable !stat3 { finish_test return } diff --git a/test/tkt-cbd054fa6b.test b/test/tkt-cbd054fa6b.test index 6e7455b3a3..180acf56df 100644 --- a/test/tkt-cbd054fa6b.test +++ b/test/tkt-cbd054fa6b.test @@ -16,7 +16,7 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -ifcapable !stat2 { +ifcapable !stat3 { finish_test return } @@ -46,7 +46,7 @@ do_test tkt-cbd05-1.2 { do_test tkt-cbd05-1.3 { execsql { SELECT tbl,idx,group_concat(sample,' ') - FROM sqlite_stat2 + FROM sqlite_stat3 WHERE idx = 't1_x' GROUP BY tbl,idx } @@ -78,7 +78,7 @@ do_test tkt-cbd05-2.2 { do_test tkt-cbd05-2.3 { execsql { SELECT tbl,idx,group_concat(sample,' ') - FROM sqlite_stat2 + FROM sqlite_stat3 WHERE idx = 't1_x' GROUP BY tbl,idx } -- 2.47.2