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.
13 # This file implements tests to verify that ticket #3554 has been
16 # $Id: tkt3554.test,v 1.2 2009/06/05 17:09:12 drh Exp $
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
28 CREATE TABLE test ( obj, t1, t2, PRIMARY KEY(obj, t1, t2) );
30 CREATE TRIGGER test_insert BEFORE INSERT ON test BEGIN
31 UPDATE test SET t1 = new.t1
32 WHERE obj = new.obj AND new.t1 < t1 AND new.t2 >= t1;
34 UPDATE test SET t2 = new.t2
35 WHERE obj = new.obj AND new.t2 > t2 AND new.t1 <= t2;
37 SELECT RAISE(IGNORE) WHERE EXISTS (
39 WHERE obj = new.obj AND new.t1 >= t1 AND new.t2 <= t2
47 INSERT INTO test VALUES('a', 10000, 11000);
55 INSERT INTO test VALUES('a', 9000, 10500);
57 execsql { SELECT * FROM test }
62 INSERT INTO test VALUES('a', 10000, 12000);
64 execsql { SELECT * FROM test }