diff options
author | drh <drh@noemail.net> | 2019-05-04 17:32:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2019-05-04 17:32:07 +0000 |
commit | 664d6d139eb0ed6ec51aef76db4e22e7f41bc31c (patch) | |
tree | 54ed5a22b2bcc6e67abc2b5f64c81a373d6cd710 /test | |
parent | bc8b231098ae2cbc7528370ab722579f5d3b23fc (diff) | |
download | sqlite-664d6d139eb0ed6ec51aef76db4e22e7f41bc31c.tar.gz sqlite-664d6d139eb0ed6ec51aef76db4e22e7f41bc31c.zip |
Fix the NOT NULL logic in the theorem prover that determines when a partial
index can be used. Ticket [5c6955204c392ae763a95].
FossilOrigin-Name: c2e439bccc40825e211bfa9a88e6a251ff066ca7453d4e7cb5eab56ce7332635
Diffstat (limited to 'test')
-rw-r--r-- | test/index6.test | 13 | ||||
-rw-r--r-- | test/index7.test | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test/index6.test b/test/index6.test index 29b73f72d..bb3f629cc 100644 --- a/test/index6.test +++ b/test/index6.test @@ -410,4 +410,17 @@ do_execsql_test index6-12.1 { do_execsql_test index6-12.2 { SELECT x FROM t2 WHERE x IN (SELECT a FROM t1) ORDER BY +x; } {1 2} + +# 2019-05-04 +# Ticket https://www.sqlite.org/src/tktview/5c6955204c392ae763a95 +# Theorem prover error +# +do_execsql_test index6-13.1 { + DROP TABLE IF EXISTS t0; + CREATE TABLE t0(c0); + CREATE INDEX index_0 ON t0(c0) WHERE c0 NOT NULL; + INSERT INTO t0(c0) VALUES (NULL); + SELECT * FROM t0 WHERE c0 OR 1; +} {{}} + finish_test diff --git a/test/index7.test b/test/index7.test index aa0cf8c1f..bd529dfbc 100644 --- a/test/index7.test +++ b/test/index7.test @@ -186,7 +186,7 @@ do_test index7-1.15 { } } {t1 {15 1} t1a {10 1} t1b {8 1} t1c {15 1} ok} -# Queries use partial indices as appropriate times. +# Queries use partial indices at appropriate times. # do_test index7-2.1 { execsql { |