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

Unified Diff: third_party/sqlite/src/test/where6.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/where3.test ('k') | third_party/sqlite/src/test/where7.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/where6.test
diff --git a/third_party/sqlite/src/test/where6.test b/third_party/sqlite/src/test/where6.test
index bcea6540a5f4f3fd8082dd3f9d9fc9c5e25e1444..83e975b7dd6d1be9879166ff3fafb0d217b91e31 100644
--- a/third_party/sqlite/src/test/where6.test
+++ b/third_party/sqlite/src/test/where6.test
@@ -127,4 +127,28 @@ do_test where6-2.14 {
}
} {1 3 1 3}
+# Ticket [ebdbadade5b]:
+# If the ON close on a LEFT JOIN is of the form x=y where both x and y
+# are indexed columns on tables to left of the join, then do not use that
+# term with indices to either table.
+#
+do_test where6-3.1 {
+ db eval {
+ CREATE TABLE t4(x UNIQUE);
+ INSERT INTO t4 VALUES('abc');
+ INSERT INTO t4 VALUES('def');
+ INSERT INTO t4 VALUES('ghi');
+ CREATE TABLE t5(a, b, c, PRIMARY KEY(a,b));
+ INSERT INTO t5 VALUES('abc','def',123);
+ INSERT INTO t5 VALUES('def','ghi',456);
+
+ SELECT t4a.x, t4b.x, t5.c, t6.v
+ FROM t4 AS t4a
+ INNER JOIN t4 AS t4b
+ LEFT JOIN t5 ON t5.a=t4a.x AND t5.b=t4b.x
+ LEFT JOIN (SELECT 1 AS v) AS t6 ON t4a.x=t4b.x
+ ORDER BY 1, 2, 3;
+ }
+} {abc abc {} 1 abc def 123 {} abc ghi {} {} def abc {} {} def def {} 1 def ghi 456 {} ghi abc {} {} ghi def {} {} ghi ghi {} 1}
+
finish_test
« no previous file with comments | « third_party/sqlite/src/test/where3.test ('k') | third_party/sqlite/src/test/where7.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698