/ Check-in [096312da]
Login

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:096312dacb9eb2f8da3cec1504aef8629b505e7f
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
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/misc3.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
202
203
204
205
206
207
208
209


210



























211
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc3.test,v 1.6 2004/01/14 21:59:24 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Ticket #529.  Make sure an ABORT does not damage the in-memory cache
# that will be used by subsequent statements in the same transaction.
#
................................................................................
  }
} {64}
do_test misc3-4.3 {
  execsql {
    SELECT count(a) FROM t3 WHERE b IN (SELECT b FROM t3 ORDER BY a+1);
  }
} {64}































finish_test







|







 








>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# This file implements tests for miscellanous features that were
# left out of other test files.
#
# $Id: misc3.test,v 1.7 2004/02/09 14:35:28 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Ticket #529.  Make sure an ABORT does not damage the in-memory cache
# that will be used by subsequent statements in the same transaction.
#
................................................................................
  }
} {64}
do_test misc3-4.3 {
  execsql {
    SELECT count(a) FROM t3 WHERE b IN (SELECT b FROM t3 ORDER BY a+1);
  }
} {64}

# Ticket #601:  Putting a left join inside "SELECT * FROM (<join-here>)"
# gives different results that if the outer "SELECT * FROM ..." is omitted.
#
do_test misc4-5.1 {
  execsql {
    CREATE TABLE x1 (b, c);
    INSERT INTO x1 VALUES('dog',3);
    INSERT INTO x1 VALUES('cat',1);
    INSERT INTO x1 VALUES('dog',4);
    CREATE TABLE x2 (c, e);
    INSERT INTO x2 VALUES(1,'one');
    INSERT INTO x2 VALUES(2,'two');
    INSERT INTO x2 VALUES(3,'three');
    INSERT INTO x2 VALUES(4,'four');
    SELECT x2.c AS c, e, b FROM x2 LEFT JOIN
       (SELECT b, max(c) AS c FROM x1 GROUP BY b)
       USING(c);
  }
} {1 one cat 2 two {} 3 three {} 4 four dog}
do_test misc4-5.2 {
  execsql {
    SELECT * FROM (
      SELECT x2.c AS c, e, b FROM x2 LEFT JOIN
         (SELECT b, max(c) AS c FROM x1 GROUP BY b)
         USING(c)
    );
  }
} {1 one cat 2 two {} 3 three {} 4 four dog}


finish_test