SQLite

Check-in [c2af7d2c94]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a datatype in trigger6.test that changed due to the previous check-in. (CVS 2454)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2af7d2c947bcec507087cc3a1e5b21e6322e4cd
User & Date: drh 2005-05-05 11:04:50.000
Context
2005-05-05
18:14
Patch to fix an alignment problem on sparc. Ticket #1234. (CVS 2455) (check-in: 240cce10d4 user: drh tags: trunk)
11:04
Fix a datatype in trigger6.test that changed due to the previous check-in. (CVS 2454) (check-in: c2af7d2c94 user: drh tags: trunk)
10:30
In the TCL interface, user-defined functions preserve the datatype returned by the Tcl procedure. (CVS 2453) (check-in: 99dcba1fb1 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/trigger6.test.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This file implements tests to make sure expression of an INSERT
# and UPDATE statement are only evaluated once.  See ticket #980.
# If an expression uses a function that has side-effects or which
# is not deterministic (ex: random()) then we want to make sure
# that the same evaluation occurs for the actual INSERT/UPDATE and
# for the NEW.* fields of any triggers that fire.
#
# $Id: trigger6.test,v 1.1 2004/12/07 15:41:50 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable {!trigger} {
  finish_test
  return
}







|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This file implements tests to make sure expression of an INSERT
# and UPDATE statement are only evaluated once.  See ticket #980.
# If an expression uses a function that has side-effects or which
# is not deterministic (ex: random()) then we want to make sure
# that the same evaluation occurs for the actual INSERT/UPDATE and
# for the NEW.* fields of any triggers that fire.
#
# $Id: trigger6.test,v 1.2 2005/05/05 11:04:50 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable {!trigger} {
  finish_test
  return
}
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
do_test trigger6-1.3 {
  execsql {
    DELETE FROM t1;
    DELETE FROM log;
    INSERT INTO t1 VALUES(2,counter(2,3)+4);
    SELECT * FROM t1;
  }
} {2 6.0}
do_test trigger6-1.4 {
  execsql {
    SELECT * FROM log;
  }
} {1 2 6.0}
do_test trigger6-1.5 {
  execsql {
    DELETE FROM log;
    UPDATE t1 SET y=counter(5);
    SELECT * FROM t1;
  }
} {2 3}







|




|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
do_test trigger6-1.3 {
  execsql {
    DELETE FROM t1;
    DELETE FROM log;
    INSERT INTO t1 VALUES(2,counter(2,3)+4);
    SELECT * FROM t1;
  }
} {2 6}
do_test trigger6-1.4 {
  execsql {
    SELECT * FROM log;
  }
} {1 2 6}
do_test trigger6-1.5 {
  execsql {
    DELETE FROM log;
    UPDATE t1 SET y=counter(5);
    SELECT * FROM t1;
  }
} {2 3}