]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
More test cases to help ensure that partial indexes do not get used if their tkt-2326c258
authordrh <drh@noemail.net>
Tue, 24 Feb 2015 18:39:00 +0000 (18:39 +0000)
committerdrh <drh@noemail.net>
Tue, 24 Feb 2015 18:39:00 +0000 (18:39 +0000)
qualifing constraint is inside the ON clause of a LEFT JOIN.

FossilOrigin-Name: c6399958a17e8b7c1798a9240fb06bffc774b332

manifest
manifest.uuid
test/index6.test

index 07b1467343b311b1efa90b1d81cf611757c05ded..04f8e1d71c1f9f3cec4ba513ad05ab6117d8429a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C This\sadditional\sfix\sprevents\sa\spartial\sindex\sfrom\sbeing\squalified\sfor\suse\s\nif\sthe\sconstraint\sthat\squalifies\sthe\spartial\sindex\sis\spart\sof\sthe\sON\sclause\sof\na\sLEFT\sJOIN.
-D 2015-02-24T16:48:59.496
+C More\stest\scases\sto\shelp\sensure\sthat\spartial\sindexes\sdo\snot\sget\sused\sif\stheir\nqualifing\sconstraint\sis\sinside\sthe\sON\sclause\sof\sa\sLEFT\sJOIN.
+D 2015-02-24T18:39:00.173
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 6b9e7677829aa94b9f30949656e27312aefb9a46
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -652,7 +652,7 @@ F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
 F test/index3.test 55a90cff99834305e8141df7afaef39674b57062
 F test/index4.test ab92e736d5946840236cd61ac3191f91a7856bf6
 F test/index5.test 25b0b451aceed4ac5f7d49f856f6de7257470b3e
-F test/index6.test fb370966ac3cd0989053dd5385757b5c3e24ab6a
+F test/index6.test c56852451b574ad5b2a1789e566e62e6ab244f42
 F test/index7.test 917cf1e1c7439bb155abbeabec511b28945e157b
 F test/indexedby.test b2f22f3e693a53813aa3f50b812eb609ba6df1ec
 F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
@@ -1239,7 +1239,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c0f4e308a508183b72ceda447dc3ac778cb85b9f
-R 4fd07aecba33e9248bb5425721691954
+P 1a1516e4da26dcee35e6fbb6604ce252faf3d116
+R 65a9e61b66b400145ad4b4adbab491c4
 U drh
-Z 49115944492618e32f7d86cca0efe1da
+Z f7c7ecf68414d2c1e5314c6ea356d3c1
index 36a5889cda2d87463bffcb13061dc67df97b0a7f..5b0e5ce53e3cebdced3c647e47b991c17f463edc 100644 (file)
@@ -1 +1 @@
-1a1516e4da26dcee35e6fbb6604ce252faf3d116
\ No newline at end of file
+c6399958a17e8b7c1798a9240fb06bffc774b332
\ No newline at end of file
index 68bdd06c14b477c31f9c276828925688b333492e..8414b11baafe5056db6892a3ca13f67362e7242f 100644 (file)
@@ -267,5 +267,33 @@ do_execsql_test index6-6.2 {
   PRAGMA integrity_check;
 } {ok}
 
+# Test case for ticket [2326c258d02ead33d69faa63de8f4686b9b1b9d9] on
+# 2015-02-24.  Any use of a partial index qualifying constraint inside
+# the ON clause of a LEFT JOIN was causing incorrect results for all
+# versions of SQLite 3.8.0 through 3.8.8.
+#
+do_execsql_test index6-7.0 {
+  CREATE TABLE t7a(x);
+  CREATE TABLE t7b(y);
+  INSERT INTO t7a(x) VALUES(1);
+  CREATE INDEX t7ax ON t7a(x) WHERE x=99;
+  PRAGMA automatic_index=OFF;
+  SELECT * FROM t7a LEFT JOIN t7b ON (x=99) ORDER BY x;
+} {1 {}}
+do_execsql_test index6-7.1 {
+  INSERT INTO t7b(y) VALUES(2);
+  SELECT * FROM t7a JOIN t7b ON (x=99) ORDER BY x;
+} {}
+do_execsql_test index6-7.2 {
+  INSERT INTO t7a(x) VALUES(99);
+  SELECT * FROM t7a LEFT JOIN t7b ON (x=99) ORDER BY x;
+} {1 {} 99 2}
+do_execsql_test index6-7.3 {
+  SELECT * FROM t7a JOIN t7b ON (x=99) ORDER BY x;
+} {99 2}
+do_execsql_test index6-7.4 {
+  EXPLAIN QUERY PLAN
+  SELECT * FROM t7a JOIN t7b ON (x=99) ORDER BY x;
+} {/USING COVERING INDEX t7ax/}
 
 finish_test