-C Make\ssure\sthe\scolWidth\sarray\sis\scorrectly\sinitialized\sin\sthe\s".explain"\ncommand\sof\sthe\sshell.
-D 2013-11-27T13:24:18.470
+C Additional\stest\scases\sfor\sskip-scan.
+D 2013-11-27T13:48:02.795
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/shrink.test 8c70f62b6e8eb4d54533de6d65bd06b1b9a17868
F test/sidedelete.test f0ad71abe6233e3b153100f3b8d679b19a488329
F test/skipscan1.test 6bb4891c2cc5efd5690a9da9e7508e53d4a68e10
-F test/skipscan2.test c1e21a19ec8fa3674e9ccd0475f20ef82c275838
+F test/skipscan2.test 5a4db0799c338ddbacb154aaa5589c0254b36a8d
F test/soak.test 0b5b6375c9f4110c828070b826b3b4b0bb65cd5f
F test/softheap1.test 40562fe6cac6d9827b7b42b86d45aedf12c15e24
F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 83c0bb9913838d18ba355033afde6e38b4690842
-R 67ef9465051c6a15a8474ed69b1e156e
+P ceebcdcaf1acf409b77b4cc2903b4570001f098a
+R bcfcf6f48c85e4fa706276f8ed169192
U drh
-Z 9742934aff6856eb16d7b29615a17978
+Z 88c6067bf128a26cfad7d97b15ea7137
ORDER BY 1;
} {David Jack Patrick Quiana Xavier}
+# Add 8 more people, bringing the total to 34. Then the number of
+# duplicates in the left-column of the index will be 17 and
+# skip-scan should not be used after an (unfudged) ANALYZE.
+#
+do_execsql_test skipscan2-1.8 {
+ INSERT INTO people VALUES('Angie','student',166);
+ INSERT INTO people VALUES('Brad','student',176);
+ INSERT INTO people VALUES('Claire','student',168);
+ INSERT INTO people VALUES('Donald','student',162);
+ INSERT INTO people VALUES('Elaine','student',177);
+ INSERT INTO people VALUES('Frazier','student',159);
+ INSERT INTO people VALUES('Grace','student',179);
+ INSERT INTO people VALUES('Horace','student',166);
+ ANALYZE;
+ SELECT stat FROM sqlite_stat1 WHERE idx='people_idx1';
+} {{34 17 2}}
+db cache flush
+do_execsql_test skipscan2-1.9 {
+ SELECT name FROM people WHERE height>=180 ORDER BY +name;
+} {David Jack Patrick Quiana Xavier}
+do_execsql_test skipscan2-1.9eqp {
+ EXPLAIN QUERY PLAN
+ SELECT name FROM people WHERE height>=180 ORDER BY +name;
+} {~/*INDEX people_idx1 */}
+
+# Add 2 more people, bringing the total to 36. Then the number of
+# duplicates in the left-column of the index will be 18 and
+# skip-scan will be used after an (unfudged) ANALYZE.
+#
+do_execsql_test skipscan2-1.10 {
+ INSERT INTO people VALUES('Ingrad','student',155);
+ INSERT INTO people VALUES('Jacob','student',179);
+ ANALYZE;
+ SELECT stat FROM sqlite_stat1 WHERE idx='people_idx1';
+} {{36 18 2}}
+db cache flush
+do_execsql_test skipscan2-1.11 {
+ SELECT name FROM people WHERE height>=180 ORDER BY +name;
+} {David Jack Patrick Quiana Xavier}
+do_execsql_test skipscan2-1.11eqp {
+ EXPLAIN QUERY PLAN
+ SELECT name FROM people WHERE height>=180 ORDER BY +name;
+} {/*INDEX people_idx1 */}
+
+
# Repeat using a WITHOUT ROWID table.
#
do_execsql_test skipscan2-2.1 {
CREATE INDEX peoplew_idx1 ON peoplew(role, height);
INSERT INTO peoplew(name,role,height)
SELECT name, role, height FROM people;
- DROP TABLE people;
+ ALTER TABLE people RENAME TO old_people;
SELECT name FROM peoplew WHERE height>=180 ORDER BY +name;
} {David Jack Patrick Quiana Xavier}
do_execsql_test skipscan2-2.2 {
#
do_execsql_test skipscan2-2.4 {
ANALYZE;
- -- We do not have enough people above to actually force the use
- -- of a skip-scan. So make a manual adjustment to the stat1 table
- -- to make it seem like there are many more.
- UPDATE sqlite_stat1 SET stat='10000 5000 20' WHERE idx='peoplew_idx1';
- ANALYZE sqlite_master;
}
db cache flush
do_execsql_test skipscan2-2.5 {