Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: third_party/sqlite/src/test/coveridxscan.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/cost.test ('k') | third_party/sqlite/src/test/crash8.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/coveridxscan.test
diff --git a/third_party/sqlite/src/test/coveridxscan.test b/third_party/sqlite/src/test/coveridxscan.test
index 7b3c0b0be9942aa898a9dd483797ded8c12948e6..a8d1a8ff75ced45f336dd8971cb3e39ccfcbaf78 100644
--- a/third_party/sqlite/src/test/coveridxscan.test
+++ b/third_party/sqlite/src/test/coveridxscan.test
@@ -89,5 +89,36 @@ do_test 4.3 {
db eval {SELECT b FROM t1}
} {2 4 8}
+#-------------------------------------------------------------------------
+# Test that indexes with large numbers of columns can be correctly
+# identified as covering indexes.
+reset_db
+set L [list]
+for {set i 1} {$i<120} {incr i} {
+ lappend L "c$i"
+}
+set cols [join $L ,]
+
+do_execsql_test 5.1.0 "
+ CREATE TABLE t1(a, b, c, $cols, PRIMARY KEY(a, b, c)) WITHOUT ROWID;
+ CREATE INDEX i1 ON t1($cols);
+
+ CREATE TABLE t2(i INTEGER PRIMARY KEY, $cols);
+ CREATE INDEX i2 ON t2($cols);
+"
+
+do_eqp_test 5.1.1 {
+ SELECT * FROM t1 ORDER BY c1, c2;
+} {
+ 0 0 0 {SCAN TABLE t1 USING COVERING INDEX i1}
+}
+
+do_eqp_test 5.1.2 {
+ SELECT * FROM t2 ORDER BY c1, c2;
+} {
+ 0 0 0 {SCAN TABLE t2 USING COVERING INDEX i2}
+}
+
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/cost.test ('k') | third_party/sqlite/src/test/crash8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698