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 # This file implements regression tests for SQLite library. The
13 # focus of this file is testing the fix for ticket #3419.
14 # Ticket #3419 is really a duplication of #3408 and had already
15 # been fixed by the time it was reported. But it never hurts to
18 # $Id: tkt3419.test,v 1.1 2008/10/06 15:31:13 drh Exp $
20 set testdir [file dirname $argv0]
21 source $testdir/tester.tcl
25 create table a(id integer primary key);
26 create table b(id integer primary key, a_id integer);
27 create table c(id integer primary key, b_id integer);
29 insert into a values (1);
30 insert into a values (2);
32 insert into b values (3, 1);
33 insert into b values (4, 1);
34 insert into b values (5, 1);
35 insert into b values (6, 1);
36 insert into b values (9, 2);
38 insert into c values (4, 3);
39 insert into c values (5, 5);
40 insert into c values (6, 4);
41 insert into c values (7, 6);
42 insert into c values (8, 9);
44 select * FROM a, b, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
49 select * FROM a, c, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
54 select * FROM b, a, c WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
59 select * FROM b, c, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
64 select * FROM c, a, b WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;
69 select * FROM c, b, a WHERE a.id=2 AND b.a_id = a.id AND b.id=c.b_id;