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

Side by Side Diff: third_party/sqlite/src/test/select7.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/select6.test ('k') | third_party/sqlite/src/test/select8.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 # The author disclaims copyright to this source code. In place of 1 # The author disclaims copyright to this source code. In place of
2 # a legal notice, here is a blessing: 2 # a legal notice, here is a blessing:
3 # 3 #
4 # May you do good and not evil. 4 # May you do good and not evil.
5 # May you find forgiveness for yourself and forgive others. 5 # May you find forgiveness for yourself and forgive others.
6 # May you share freely, never taking more than you give. 6 # May you share freely, never taking more than you give.
7 # 7 #
8 #*********************************************************************** 8 #***********************************************************************
9 # This file implements regression tests for SQLite library. The 9 # This file implements regression tests for SQLite library. The
10 # focus of this file is testing compute SELECT statements and nested 10 # focus of this file is testing compute SELECT statements and nested
11 # views. 11 # views.
12 # 12 #
13 # $Id: select7.test,v 1.11 2007/09/12 17:01:45 danielk1977 Exp $ 13 # $Id: select7.test,v 1.11 2007/09/12 17:01:45 danielk1977 Exp $
14 14
15 15
16 set testdir [file dirname $argv0] 16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl 17 source $testdir/tester.tcl
18 set testprefix select7
18 19
19 ifcapable compound { 20 ifcapable compound {
20 21
21 # A 3-way INTERSECT. Ticket #875 22 # A 3-way INTERSECT. Ticket #875
22 ifcapable tempdb { 23 ifcapable tempdb {
23 do_test select7-1.1 { 24 do_test select7-1.1 {
24 execsql { 25 execsql {
25 create temp table t1(x); 26 create temp table t1(x);
26 insert into t1 values('amx'); 27 insert into t1 values('amx');
27 insert into t1 values('anx'); 28 insert into t1 values('anx');
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } {0 real 0 real} 195 } {0 real 0 real}
195 196
196 do_test select7-7.7 { 197 do_test select7-7.7 {
197 execsql { 198 execsql {
198 CREATE TABLE t5(a TEXT, b INT); 199 CREATE TABLE t5(a TEXT, b INT);
199 INSERT INTO t5 VALUES(123, 456); 200 INSERT INTO t5 VALUES(123, 456);
200 SELECT typeof(a), a FROM t5 GROUP BY a HAVING a<b; 201 SELECT typeof(a), a FROM t5 GROUP BY a HAVING a<b;
201 } 202 }
202 } {text 123} 203 } {text 123}
203 204
205 do_execsql_test 8.0 {
206 CREATE TABLE t01(x, y);
207 CREATE TABLE t02(x, y);
208 }
209
210 do_catchsql_test 8.1 {
211 SELECT * FROM (
212 SELECT * FROM t01 UNION SELECT x FROM t02
213 ) WHERE y=1
214 } {1 {SELECTs to the left and right of UNION do not have the same number of resu lt columns}}
215
216 do_catchsql_test 8.2 {
217 CREATE VIEW v0 as SELECT x, y FROM t01 UNION SELECT x FROM t02;
218 EXPLAIN QUERY PLAN SELECT * FROM v0 WHERE x='0' OR y;
219 } {1 {SELECTs to the left and right of UNION do not have the same number of resu lt columns}}
220
221
204 finish_test 222 finish_test
223
224
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/select6.test ('k') | third_party/sqlite/src/test/select8.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698