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

Side by Side Diff: third_party/sqlite/src/test/subselect.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 unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/stmt.test ('k') | third_party/sqlite/src/test/superlock.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 # 2001 September 15 1 # 2001 September 15
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 22 matching lines...) Expand all
33 INSERT INTO t1 VALUES(5,6); 33 INSERT INTO t1 VALUES(5,6);
34 } 34 }
35 execsql {SELECT * FROM t1 WHERE a = (SELECT count(*) FROM t1)} 35 execsql {SELECT * FROM t1 WHERE a = (SELECT count(*) FROM t1)}
36 } {3 4} 36 } {3 4}
37 37
38 # Try a select with more than one result column. 38 # Try a select with more than one result column.
39 # 39 #
40 do_test subselect-1.2 { 40 do_test subselect-1.2 {
41 set v [catch {execsql {SELECT * FROM t1 WHERE a = (SELECT * FROM t1)}} msg] 41 set v [catch {execsql {SELECT * FROM t1 WHERE a = (SELECT * FROM t1)}} msg]
42 lappend v $msg 42 lappend v $msg
43 } {1 {only a single result allowed for a SELECT that is part of an expression}} 43 } {1 {row value misused}}
44 44
45 # A subselect without an aggregate. 45 # A subselect without an aggregate.
46 # 46 #
47 do_test subselect-1.3a { 47 do_test subselect-1.3a {
48 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=2)} 48 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=2)}
49 } {2} 49 } {2}
50 do_test subselect-1.3b { 50 do_test subselect-1.3b {
51 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=4)} 51 execsql {SELECT b from t1 where a = (SELECT a FROM t1 WHERE b=4)}
52 } {4} 52 } {4}
53 do_test subselect-1.3c { 53 do_test subselect-1.3c {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 SELECT a FROM t4 WHERE b IN (SELECT b FROM t4 ORDER BY b LIMIT 1); 201 SELECT a FROM t4 WHERE b IN (SELECT b FROM t4 ORDER BY b LIMIT 1);
202 } 202 }
203 } {a} 203 } {a}
204 do_test subselect-4.3 { 204 do_test subselect-4.3 {
205 execsql { 205 execsql {
206 SELECT a FROM t4 WHERE b IN (SELECT b FROM t4 ORDER BY b DESC LIMIT 1); 206 SELECT a FROM t4 WHERE b IN (SELECT b FROM t4 ORDER BY b DESC LIMIT 1);
207 } 207 }
208 } {c} 208 } {c}
209 209
210 finish_test 210 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/stmt.test ('k') | third_party/sqlite/src/test/superlock.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698