Fix test cases so that they work when the query planner uses index size

estimates to determine whether or not to try an covering index scan.

FossilOrigin-Name: 2f394de88f23dacd3c61e586a4214ffc6f927d97
This commit is contained in:
drh
2013-10-04 15:58:59 +00:00
parent fdaac671b8
commit 165674d8db
7 changed files with 53 additions and 50 deletions
+6 -6
View File
@@ -18,23 +18,23 @@ source $testdir/tester.tcl
do_test tkt-78e04-1.0 {
execsql {
CREATE TABLE ""("" UNIQUE);
CREATE TABLE ""("" UNIQUE, x CHAR(100));
CREATE TABLE t2(x);
INSERT INTO "" VALUES(1);
INSERT INTO ""("") VALUES(1);
INSERT INTO t2 VALUES(2);
SELECT * FROM "", t2;
}
} {1 2}
} {1 {} 2}
do_test tkt-78e04-1.1 {
catchsql {
INSERT INTO "" VALUES(1);
INSERT INTO ""("") VALUES(1);
}
} {1 {column is not unique}}
do_test tkt-78e04-1.2 {
execsql {
PRAGMA table_info("");
}
} {0 {} {} 0 {} 0}
} {0 {} {} 0 {} 0 1 x CHAR(100) 0 {} 0}
do_test tkt-78e04-1.3 {
execsql {
CREATE INDEX i1 ON ""("" COLLATE nocase);
@@ -42,7 +42,7 @@ do_test tkt-78e04-1.3 {
} {}
do_test tkt-78e04-1.4 {
execsql {
EXPLAIN QUERY PLAN SELECT * FROM "" WHERE "" LIKE 'abc%';
EXPLAIN QUERY PLAN SELECT "" FROM "" WHERE "" LIKE 'abc%';
}
} {0 0 0 {SCAN TABLE USING COVERING INDEX i1}}
do_test tkt-78e04-1.5 {