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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2007 June 8 1 # 2007 June 8
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 execsql { 120 execsql {
121 SELECT * FROM t1 LEFT JOIN t2 ON x=b WHERE 1=c; 121 SELECT * FROM t1 LEFT JOIN t2 ON x=b WHERE 1=c;
122 } 122 }
123 } {1 3 1 3} 123 } {1 3 1 3}
124 do_test where6-2.14 { 124 do_test where6-2.14 {
125 execsql { 125 execsql {
126 SELECT * FROM t1 LEFT JOIN t2 ON b=x WHERE 1=c; 126 SELECT * FROM t1 LEFT JOIN t2 ON b=x WHERE 1=c;
127 } 127 }
128 } {1 3 1 3} 128 } {1 3 1 3}
129 129
130 # Ticket [ebdbadade5b]:
131 # If the ON close on a LEFT JOIN is of the form x=y where both x and y
132 # are indexed columns on tables to left of the join, then do not use that
133 # term with indices to either table.
134 #
135 do_test where6-3.1 {
136 db eval {
137 CREATE TABLE t4(x UNIQUE);
138 INSERT INTO t4 VALUES('abc');
139 INSERT INTO t4 VALUES('def');
140 INSERT INTO t4 VALUES('ghi');
141 CREATE TABLE t5(a, b, c, PRIMARY KEY(a,b));
142 INSERT INTO t5 VALUES('abc','def',123);
143 INSERT INTO t5 VALUES('def','ghi',456);
144
145 SELECT t4a.x, t4b.x, t5.c, t6.v
146 FROM t4 AS t4a
147 INNER JOIN t4 AS t4b
148 LEFT JOIN t5 ON t5.a=t4a.x AND t5.b=t4b.x
149 LEFT JOIN (SELECT 1 AS v) AS t6 ON t4a.x=t4b.x
150 ORDER BY 1, 2, 3;
151 }
152 } {abc abc {} 1 abc def 123 {} abc ghi {} {} def abc {} {} def def {} 1 def ghi 456 {} ghi abc {} {} ghi def {} {} ghi ghi {} 1}
153
130 finish_test 154 finish_test
OLDNEW
« 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