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

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

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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/where6.test ('k') | third_party/sqlite/src/test/where8.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/where7.test
diff --git a/third_party/sqlite/src/test/where7.test b/third_party/sqlite/src/test/where7.test
index 10a94c137082cb220804d0cd47dc375fc92269e9..e34778c76311f076a8f54da088090125c7b7a8a6 100644
--- a/third_party/sqlite/src/test/where7.test
+++ b/third_party/sqlite/src/test/where7.test
@@ -90,12 +90,10 @@ do_test where7-1.9 {
}
} {2 4 5 scan 0 sort 0}
do_test where7-1.10 {
-breakpoint
count_steps {
SELECT a FROM t1 WHERE (b=3 OR c>=10 OR c=4 OR b>10)
}
} {2 4 5 scan 0 sort 0}
-breakpoint
do_test where7-1.11 {
count_steps {
SELECT a FROM t1 WHERE (d=5 AND b=3) OR c==100 ORDER BY a;
@@ -106,13 +104,7 @@ do_test where7-1.12 {
SELECT a FROM t1 WHERE (b BETWEEN 2 AND 4) OR c=100 ORDER BY a
}
} {1 2 3 5 scan 0 sort 1}
-do_test where7-1.13.1 {
- count_steps {
- SELECT a FROM t1 WHERE (b BETWEEN 0 AND 2) OR (c BETWEEN 9 AND 999)
- ORDER BY a DESC
- }
-} {5 4 1 scan 4 sort 0}
-do_test where7-1.13.2 {
+do_test where7-1.13 {
count_steps {
SELECT a FROM t1 WHERE (b BETWEEN 0 AND 2) OR (c BETWEEN 9 AND 999)
ORDER BY +a DESC
@@ -23307,6 +23299,52 @@ do_test where7-2.1001.2 {
OR a=91
}
} {2 22 23 28 54 80 91 scan 0 sort 0}
-finish_test
+
+# test case for the performance regression fixed by
+# check-in 28ba6255282b on 2010-10-21 02:05:06
+#
+# The test case that follows is code from an actual
+# application with identifiers change and unused columns
+# remove.
+#
+do_execsql_test where7-3.1 {
+ CREATE TABLE t301 (
+ c8 INTEGER PRIMARY KEY,
+ c6 INTEGER,
+ c4 INTEGER,
+ c7 INTEGER,
+ FOREIGN KEY (c4) REFERENCES series(c4)
+ );
+ CREATE INDEX t301_c6 on t301(c6);
+ CREATE INDEX t301_c4 on t301(c4);
+ CREATE INDEX t301_c7 on t301(c7);
+
+ CREATE TABLE t302 (
+ c1 INTEGER PRIMARY KEY,
+ c8 INTEGER,
+ c5 INTEGER,
+ c3 INTEGER,
+ c2 INTEGER,
+ c4 INTEGER,
+ FOREIGN KEY (c8) REFERENCES t301(c8)
+ );
+ CREATE INDEX t302_c3 on t302(c3);
+ CREATE INDEX t302_c8_c3 on t302(c8, c3);
+ CREATE INDEX t302_c5 on t302(c5);
+
+ EXPLAIN QUERY PLAN
+ SELECT t302.c1
+ FROM t302 JOIN t301 ON t302.c8 = t301.c8
+ WHERE t302.c2 = 19571
+ AND t302.c3 > 1287603136
+ AND (t301.c4 = 1407449685622784
+ OR t301.c8 = 1407424651264000)
+ ORDER BY t302.c5 LIMIT 200;
+} {
+ 0 0 1 {SEARCH TABLE t301 USING COVERING INDEX t301_c4 (c4=?) (~10 rows)}
+ 0 0 1 {SEARCH TABLE t301 USING INTEGER PRIMARY KEY (rowid=?) (~1 rows)}
+ 0 1 0 {SEARCH TABLE t302 USING INDEX t302_c8_c3 (c8=? AND c3>?) (~2 rows)}
+ 0 0 0 {USE TEMP B-TREE FOR ORDER BY}
+}
finish_test
« no previous file with comments | « third_party/sqlite/src/test/where6.test ('k') | third_party/sqlite/src/test/where8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698