Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add test case for ticket #601. (CVS 1215) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 096312dacb9eb2f8da3cec1504aef862 |
User & Date: | drh 2004-02-09 14:35:28 |
Context
2004-02-09
| ||
14:37 | After code is generated for a subquery, delete the Select structure in order to force the temporary table to be used and to prevent the subquery from being evaluated a second time. Ticket #601. (CVS 1216) check-in: 1cff1886 user: drh tags: trunk | |
14:35 | Add test case for ticket #601. (CVS 1215) check-in: 096312da user: drh tags: trunk | |
01:20 | Add an optional codec to the pager layer. (CVS 1214) check-in: 2f0c122c user: drh tags: trunk | |
Changes
Changes to test/misc3.test.
9 9 # 10 10 #*********************************************************************** 11 11 # This file implements regression tests for SQLite library. 12 12 # 13 13 # This file implements tests for miscellanous features that were 14 14 # left out of other test files. 15 15 # 16 -# $Id: misc3.test,v 1.6 2004/01/14 21:59:24 drh Exp $ 16 +# $Id: misc3.test,v 1.7 2004/02/09 14:35:28 drh Exp $ 17 17 18 18 set testdir [file dirname $argv0] 19 19 source $testdir/tester.tcl 20 20 21 21 # Ticket #529. Make sure an ABORT does not damage the in-memory cache 22 22 # that will be used by subsequent statements in the same transaction. 23 23 # ................................................................................ 202 202 } 203 203 } {64} 204 204 do_test misc3-4.3 { 205 205 execsql { 206 206 SELECT count(a) FROM t3 WHERE b IN (SELECT b FROM t3 ORDER BY a+1); 207 207 } 208 208 } {64} 209 + 210 +# Ticket #601: Putting a left join inside "SELECT * FROM (<join-here>)" 211 +# gives different results that if the outer "SELECT * FROM ..." is omitted. 212 +# 213 +do_test misc4-5.1 { 214 + execsql { 215 + CREATE TABLE x1 (b, c); 216 + INSERT INTO x1 VALUES('dog',3); 217 + INSERT INTO x1 VALUES('cat',1); 218 + INSERT INTO x1 VALUES('dog',4); 219 + CREATE TABLE x2 (c, e); 220 + INSERT INTO x2 VALUES(1,'one'); 221 + INSERT INTO x2 VALUES(2,'two'); 222 + INSERT INTO x2 VALUES(3,'three'); 223 + INSERT INTO x2 VALUES(4,'four'); 224 + SELECT x2.c AS c, e, b FROM x2 LEFT JOIN 225 + (SELECT b, max(c) AS c FROM x1 GROUP BY b) 226 + USING(c); 227 + } 228 +} {1 one cat 2 two {} 3 three {} 4 four dog} 229 +do_test misc4-5.2 { 230 + execsql { 231 + SELECT * FROM ( 232 + SELECT x2.c AS c, e, b FROM x2 LEFT JOIN 233 + (SELECT b, max(c) AS c FROM x1 GROUP BY b) 234 + USING(c) 235 + ); 236 + } 237 +} {1 one cat 2 two {} 3 three {} 4 four dog} 209 238 210 239 211 240 finish_test