diff options
author | drh <drh@noemail.net> | 2015-08-27 23:42:43 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-08-27 23:42:43 +0000 |
commit | 31a5d34283660f4438b51ff178c793fe1cb65c64 (patch) | |
tree | 6d9e7a3fba5ecc5cb6dc0e36a19e44a660d70430 /test/where2.test | |
parent | c7c4680ffd727443c81c4b926e518b2552275d3f (diff) | |
parent | 2dc292930d004c340eba968789148916f2b89cd4 (diff) | |
download | sqlite-31a5d34283660f4438b51ff178c793fe1cb65c64.tar.gz sqlite-31a5d34283660f4438b51ff178c793fe1cb65c64.zip |
Fix the OR-optimization so that it always ignores subplans that do not use an index.
FossilOrigin-Name: cf452028d1be2c5578a07f6e21b4d8b613373eb8
Diffstat (limited to 'test/where2.test')
-rw-r--r-- | test/where2.test | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/where2.test b/test/where2.test index 367eb0dfe..434a7bcd9 100644 --- a/test/where2.test +++ b/test/where2.test @@ -322,9 +322,14 @@ do_test where2-6.3 { } {6 2 49 51 99 6 10000 10006 100 6 10201 10207 sort t1 *} do_test where2-6.4 { queryplan { - SELECT * FROM t1 WHERE w=99 OR +w=100 OR 6=w ORDER BY +w + SELECT *, '|' FROM t1 WHERE w=99 OR +w=100 OR 6=w ORDER BY +w } -} {6 2 49 51 99 6 10000 10006 100 6 10201 10207 sort t1 *} +} {6 2 49 51 | 99 6 10000 10006 | 100 6 10201 10207 | sort t1 *} +do_test where2-6.5 { + queryplan { + SELECT *, '|' FROM t1 WHERE w=99 OR y=10201 OR 6=w ORDER BY +w + } +} {6 2 49 51 | 99 6 10000 10006 | 100 6 10201 10207 | sort t1 *} set ::idx {} ifcapable subquery {set ::idx i1zyx} |