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 # $Id: tkt3992.test,v 1.1 2009/07/27 10:05:06 danielk1977 Exp $
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
19 CREATE TABLE parameters1(
20 mountcnt INT NOT NULL CHECK (typeof(mountcnt) == 'integer'),
23 INSERT INTO parameters1(mountcnt, version) VALUES(1, 1.0);
25 CREATE TABLE parameters2(
26 mountcnt INT NOT NULL CHECK (typeof(mountcnt) == 'integer'),
27 version REAL CHECK (typeof(version) == 'real')
29 INSERT INTO parameters2(mountcnt, version) VALUES(1, 1.0);
35 UPDATE parameters1 SET mountcnt = mountcnt + 1;
36 SELECT * FROM parameters1;
42 UPDATE parameters2 SET mountcnt = mountcnt + 1;
43 SELECT * FROM parameters2;
47 ifcapable altertable {
50 CREATE TABLE t1(a, b);
51 INSERT INTO t1 VALUES(1, 2);
52 ALTER TABLE t1 ADD COLUMN c DEFAULT 3;
58 UPDATE t1 SET a = 'one';
68 CREATE TABLE t2(a REAL, b REAL, c REAL);
69 INSERT INTO t2 VALUES(1, 2, 3);
70 CREATE TRIGGER tr2 BEFORE UPDATE ON t2 BEGIN
71 SELECT tcl('set res', typeof(new.c));
74 UPDATE t2 SET a = 'I';