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 #***********************************************************************
11 # This file implements regression tests for SQLite library.
12 # Specifically, it tests that bug #3201 has been fixed.
14 # $Id: tkt3201.test,v 1.3 2008/07/12 14:52:21 drh Exp $
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
21 CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
22 INSERT INTO t1 VALUES(1, 'one');
23 INSERT INTO t1 VALUES(2, 'two');
29 SELECT l.a, r.a FROM t1 AS l, t1 AS r WHERE l.a < r.a;
35 CREATE TABLE t2(a INTEGER PRIMARY KEY, b TEXT);
36 INSERT INTO t2 VALUES(2, 'two');
39 SELECT l.a, r.a FROM t1 AS l, t2 AS r WHERE l.a < r.a;
45 DELETE FROM t1 WHERE a = 2;
48 SELECT l.a, r.a FROM t1 AS l, t2 AS r WHERE l.a < r.a;
54 DELETE FROM t1 WHERE a = 2;
57 SELECT t1.a, t1.b, t2.a, t2.b FROM t1, t2;
63 CREATE TABLE t3(c INTEGER PRIMARY KEY, d TEXT);
64 INSERT INTO t3 VALUES(2, 'two');
66 execsql { SELECT a, b, c, d FROM t1, t3 }
70 execsql { SELECT a, b, c, d FROM t1, t3 WHERE a < c }
73 # Ticket [efc02f977919]
79 CREATE TABLE t4_log(x);
80 CREATE TRIGGER r4_1 AFTER INSERT ON t4 WHEN new.x=1 BEGIN
81 INSERT INTO t4_log(x) VALUES(new.x);
83 CREATE TRIGGER r4_2 AFTER INSERT ON t4 WHEN new.x=2 BEGIN
84 INSERT INTO t4_log(x) VALUES(new.x);
86 CREATE TRIGGER r4_3 AFTER INSERT ON t4 WHEN new.x=3 BEGIN
87 INSERT INTO t4_log(x) VALUES(new.x);
89 CREATE TRIGGER r4_4 AFTER INSERT ON t4 WHEN new.x=4 BEGIN
90 INSERT INTO t4_log(x) VALUES(new.x);
92 INSERT INTO t4 VALUES(1);
93 INSERT INTO t4 VALUES(2);
94 INSERT INTO t4 VALUES(3);
95 INSERT INTO t4 VALUES(4);