3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # Tests to verify ticket #3911 is fixed.
14 # $Id: tkt3911.test,v 1.1 2009/06/12 03:27:28 drh Exp $
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
22 INSERT INTO t1 VALUES(1,2);
23 INSERT INTO t1 VALUES(11,12);
26 INSERT INTO t2 VALUES(2,3);
27 INSERT INTO t2 VALUES(22,23);
29 SELECT * FROM t1 JOIN t2 USING(b);
34 SELECT * FROM t1 JOIN (t2) AS x USING (b);
39 SELECT * FROM t1 JOIN (SELECT * FROM t2) AS x USING (b);
46 INSERT INTO t3 VALUES('one',1);
47 INSERT INTO t3 VALUES('two',2);
49 SELECT * FROM t3 JOIN (SELECT * FROM t1 NATURAL JOIN t2) AS x USING(a);
54 SELECT * FROM t3 JOIN (SELECT * FROM t1 JOIN t2 USING (b)) AS x USING(a);