]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Additional test cases for OR-optimization with covering indices, including
authordrh <drh@noemail.net>
Fri, 24 Aug 2012 15:29:03 +0000 (15:29 +0000)
committerdrh <drh@noemail.net>
Fri, 24 Aug 2012 15:29:03 +0000 (15:29 +0000)
one test case that currently fails.

FossilOrigin-Name: d8b7ab37120ac20e60b6a600cd0e5b34a09cf97a

manifest
manifest.uuid
test/whereD.test

index cde938ca24d7549610830ac07aabda7e67e1ac2f..d50c519f35cf0ba4628c89734b50b597724a6477 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Experimental\schange\sto\ssupport\sthe\scovering\sindex\soptimization\sfor\squeries\swith\sOR\sterms\sin\sthe\sWHERE\sclause\sthat\ssearch\sa\ssingle\sindex\smore\sthan\sonce.
-D 2012-08-24T10:52:35.794
+C Additional\stest\scases\sfor\sOR-optimization\swith\scovering\sindices,\sincluding\none\stest\scase\sthat\scurrently\sfails.
+D 2012-08-24T15:29:03.804
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -965,7 +965,7 @@ F test/where9.test ae98dc22ef9b6f2bc81e9f164e41b38faa9bda06
 F test/whereA.test 24c234263c8fe358f079d5e57d884fb569d2da0a
 F test/whereB.test 0def95db3bdec220a731c7e4bec5930327c1d8c5
 F test/whereC.test 13ff5ec0dba407c0e0c075980c75b3275a6774e5
-F test/whereD.test 54e11307e85c2ae987744f0fefd34214f752ba49
+F test/whereD.test 1aee8a7b3a0674d8d0119d764e069225ce426406
 F test/wherelimit.test 5e9fd41e79bb2b2d588ed999d641d9c965619b31
 F test/win32lock.test b2a539e85ae6b2d78475e016a9636b4451dc7fb9
 F test/zeroblob.test caaecfb4f908f7bc086ed238668049f96774d688
@@ -1013,10 +1013,7 @@ F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P d4cd6017c9875947a05b1dc36538d4272fb18739
-R 0e14b06eb4293757e84906b2ad3f48bd
-T *branch * multi-or-covering-index
-T *sym-multi-or-covering-index *
-T -sym-trunk *
-U dan
-Z a3dcd5ab6d90b9bc7bd57494f6da388a
+P 1dc8c7c741a82bb98a07f3fdb8142d8bc8d8a98b
+R 0de9e52cb560b3160307382415072714
+U drh
+Z f74e9ea8f0417bf70ede532a4ecba542
index af0b97af79cbfa491a974bea872a19ed315e2d20..590ba48360f3ba71851a7ef1b2ae9ac0a57b0cd2 100644 (file)
@@ -1 +1 @@
-1dc8c7c741a82bb98a07f3fdb8142d8bc8d8a98b
\ No newline at end of file
+d8b7ab37120ac20e60b6a600cd0e5b34a09cf97a
\ No newline at end of file
index 10ccbb7d0afb38479112bb6fd90fffe2bc1cf78b..3098b1acfd80ba320e366ace3de9f4338dbcb165 100644 (file)
@@ -19,18 +19,57 @@ source $testdir/tester.tcl
 set ::testprefix whereD
 
 do_execsql_test 1.1 {
-  CREATE TABLE t(i,j,k);
-  CREATE INDEX i ON t(i,j,k);
+  CREATE TABLE t(i,j,k,m,n);
+  CREATE INDEX ijk ON t(i,j,k);
+  CREATE INDEX jmn ON t(j,m,n);
 
-  INSERT INTO t VALUES(3, 3, 'three');
-  INSERT INTO t VALUES(2, 2, 'two');
-  INSERT INTO t VALUES(1, 1, 'one');
-  INSERT INTO t VALUES(4, 4, 'four');
+  INSERT INTO t VALUES(3, 3, 'three', 3, 3);
+  INSERT INTO t VALUES(2, 2, 'two', 2, 2);
+  INSERT INTO t VALUES(1, 1, 'one', 1, 1);
+  INSERT INTO t VALUES(4, 4, 'four', 4, 4);
 }
 
 do_execsql_test 1.2 {
   SELECT k FROM t WHERE (i=1 AND j=1) OR (i=2 AND j=2);
 } {one two}
+do_execsql_test 1.3 {
+  SELECT k FROM t WHERE (i=1 AND j=1) OR (i=2 AND j=2) OR (i=3 AND j=3);
+} {one two three}
+do_execsql_test 1.4 {
+  SELECT k FROM t WHERE (i=1 AND j=1) OR (j=2 AND m=2);
+} {one two}
+do_execsql_test 1.5 {
+  SELECT k FROM t WHERE (i=1 AND j=1) OR (i=2 AND j=2) OR (j=3 AND m=3);
+} {one two three}
+do_execsql_test 1.6 {
+  SELECT k FROM t WHERE (i=1 AND j=1) OR (j=2 AND m=2) OR (i=3 AND j=3);
+} {one two three}
+do_execsql_test 1.7 {
+  SELECT k FROM t WHERE (j=1 AND m=1) OR (i=2 AND j=2) OR (i=3 AND j=3);
+} {one two three}
+do_execsql_test 1.8 {
+  SELECT k FROM t WHERE (i=1 AND j=1) OR (j=2 AND i=2) OR (i=3 AND j=3);
+} {one two three}
 
-finish_test
+do_execsql_test 2.0 {
+  CREATE TABLE t1(a,b,c,d);
+  CREATE INDEX t1b ON t1(b);
+  CREATE INDEX t1c ON t1(c);
+  CREATE INDEX t1d ON t1(d);
+  CREATE TABLE t2(x,y);
+  CREATE INDEX t2y ON t2(y);
+  
+  INSERT INTO t1 VALUES(1,2,3,4);
+  INSERT INTO t1 VALUES(5,6,7,8);
+  INSERT INTO t2 VALUES(1,2);
+  INSERT INTO t2 VALUES(2,7);
+  INSERT INTO t2 VALUES(3,4);
+} {}
+do_execsql_test 2.1 {
+  SELECT a, x FROM t1 JOIN t2 ON +y=d OR x=7 ORDER BY a, x;
+} {1 3}
+do_execsql_test 2.2 {
+  SELECT a, x FROM t1 JOIN t2 ON y=d OR x=7 ORDER BY a, x;
+} {1 3}
 
+finish_test