]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add test case for the problem fixed by [127a5b776d].
authordan <dan@noemail.net>
Thu, 1 Aug 2013 17:43:35 +0000 (17:43 +0000)
committerdan <dan@noemail.net>
Thu, 1 Aug 2013 17:43:35 +0000 (17:43 +0000)
FossilOrigin-Name: 65816718b59b286c11d939235a23c7325f25594b

manifest
manifest.uuid
test/analyze3.test

index 199045ac76262c06f86867dcfac2310b72cb146a..b1ac07e65874dcdf02a229674669911e541560f0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C An\simproved\smethod\sfor\savoiding\sthe\suse\sof\sthe\sSTAT3\ssamples\sto\scompute\nthe\sestimated\snumber\sof\soutputs\swhen\sthe\sleft-most\sindex\sis\sequality\nconstrained.\s\sThis\scheck-in\sundoes\sthe\sprevious\sfix\sand\sapplies\sa\snew\sone.
-D 2013-08-01T17:21:26.855
+C Add\stest\scase\sfor\sthe\sproblem\sfixed\sby\s[127a5b776d].
+D 2013-08-01T17:43:35.105
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -302,7 +302,7 @@ F test/alter3.test 49c9d9fba2b8fcdce2dedeca97bbf1f369cc548d
 F test/alter4.test b2debc14d8cbe4c1d12ccd6a41eef88a8c1f15d5
 F test/altermalloc.test e81ac9657ed25c6c5bb09bebfa5a047cd8e4acfc
 F test/analyze.test f8ab7d15858b4093b06caf5e57e2a5ff7104bdae
-F test/analyze3.test 69863b446539f8849a996c2aa0b50461c9cecea4
+F test/analyze3.test 53cfd07625d110e70b92b57a6ff656ea844dfbee
 F test/analyze4.test eff2df19b8dd84529966420f29ea52edc6b56213
 F test/analyze5.test 3e57f192307be931f9ab2f6ff456f9063358ac77
 F test/analyze6.test cdbf9887d40ab41301f570fe85c6e1525dd3b1c9
@@ -1103,7 +1103,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 31b4e63b3c30fcad22340d84d6076a306f26b49e
-R 492afb1fab0455fbbeddb05926432910
-U drh
-Z f007f69644258ace0d976c8e46bfead9
+P 127a5b776d16e1e23c5b3d454f6aaea67f1ded3a
+R 55095a68bf1e6bed6cc6b3606b16b8da
+U dan
+Z 4a8fdbd96b68de3d602c8482b890b1d9
index 3ccbe102ca38523308497307dacf261bf39e1636..43b445a14051b4084bec50ec55efb1f4dce512c1 100644 (file)
@@ -1 +1 @@
-127a5b776d16e1e23c5b3d454f6aaea67f1ded3a
\ No newline at end of file
+65816718b59b286c11d939235a23c7325f25594b
\ No newline at end of file
index c25d04422e28c538dd3c97466c731ea1a34d4202..1e95d591b7187c927c02aee6dfb01d4cb200a672 100644 (file)
@@ -43,6 +43,8 @@ ifcapable !stat3 {
 # analyze3-5.*: Check that the query plans of applicable statements are
 #               invalidated if the values of SQL parameter are modified
 #               using the clear_bindings() or transfer_bindings() APIs.
+# 
+# analyze3-6.*: Test that the problem fixed by commit [127a5b776d] is fixed.
 #
 
 proc getvar {varname} { uplevel #0 set $varname }
@@ -612,4 +614,29 @@ do_test analyze3-5.1.3 {
   sqlite3_finalize $S1
 } {SQLITE_OK}
 
+#-------------------------------------------------------------------------
+
+do_test analyze3-6.1 {
+  execsql { DROP TABLE IF EXISTS t1 }
+  execsql BEGIN
+  execsql { CREATE TABLE t1(a, b, c) }
+  for {set i 0} {$i < 1000} {incr i} {
+    execsql "INSERT INTO t1 VALUES([expr $i/100], 'x', [expr $i/10])"
+  }
+  execsql {
+    CREATE INDEX i1 ON t1(a, b);
+    CREATE INDEX i2 ON t1(c);
+  }
+  execsql COMMIT
+  execsql ANALYZE
+} {}
+
+do_eqp_test analyze3-6-3 {
+  SELECT * FROM t1 WHERE a = 5 AND c = 13;
+} {0 0 0 {SEARCH TABLE t1 USING INDEX i2 (c=?)}}
+
+do_eqp_test analyze3-6-2 {
+  SELECT * FROM t1 WHERE a = 5 AND b > 'w' AND c = 13;
+} {0 0 0 {SEARCH TABLE t1 USING INDEX i2 (c=?)}}
+
 finish_test