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 #3929 is fixed.
14 # $Id: tkt3929.test,v 1.1 2009/06/23 11:53:09 danielk1977 Exp $
16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl
18 ifcapable {!trigger} {
25 PRAGMA page_size = 1024;
26 CREATE TABLE t1(a, b);
27 CREATE INDEX i1 ON t1(a, b);
28 CREATE TRIGGER t1_t1 AFTER INSERT ON t1 BEGIN
29 UPDATE t1 SET b = 'value: ' || a WHERE t1.rowid = new.rowid;
36 INSERT INTO t1(a) VALUES(1);
37 INSERT INTO t1(a) VALUES(2);
40 } {1 {value: 1} 2 {value: 2}}
42 # Before it was fixed, the following provoked the bug, causing either an
43 # assertion failure or a "database is malformed" error.
46 for {set i 3} {$i < 100} {incr i} {
47 execsql { INSERT INTO t1(a) VALUES($i) }
51 integrity_check tkt3930-1.3