aboutsummaryrefslogtreecommitdiff
path: root/testdata/tcl/index7.test
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/tcl/index7.test')
-rw-r--r--testdata/tcl/index7.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/testdata/tcl/index7.test b/testdata/tcl/index7.test
index f57792e..084e8c3 100644
--- a/testdata/tcl/index7.test
+++ b/testdata/tcl/index7.test
@@ -339,5 +339,17 @@ do_execsql_test index7-7.1 {
SELECT * FROM t6 WHERE y IS TRUE ORDER BY x;
} {1 1}
+# 2020-05-27. tag-20200527-1.
+# Incomplete stat1 information on a table with few rows should still use the
+# index.
+reset_db
+do_execsql_test index7-8.1 {
+ CREATE TABLE t1(x INTEGER PRIMARY KEY, y);
+ CREATE INDEX t1y ON t1(y) WHERE y IS NOT NULL;
+ INSERT INTO t1(x) VALUES(1),(2);
+ ANALYZE;
+ EXPLAIN QUERY PLAN SELECT 1 FROM t1 WHERE y=5;
+} {/SEARCH TABLE t1 USING COVERING INDEX t1y/}
+
finish_test