diff options
author | dan miller | 2007-10-20 02:49:29 +0000 |
---|---|---|
committer | dan miller | 2007-10-20 02:49:29 +0000 |
commit | e36d23a85ebff914d74bb541558c2b6082b78edb (patch) | |
tree | 54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test | |
parent | * Fixed an issue whereby avatar chat distances were being calculated against ... (diff) | |
download | opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2 opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz |
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test b/libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test new file mode 100644 index 0000000..75c56b1 --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/trigger5.test | |||
@@ -0,0 +1,43 @@ | |||
1 | # The author disclaims copyright to this source code. In place of | ||
2 | # a legal notice, here is a blessing: | ||
3 | # | ||
4 | # May you do good and not evil. | ||
5 | # May you find forgiveness for yourself and forgive others. | ||
6 | # May you share freely, never taking more than you give. | ||
7 | # | ||
8 | #*********************************************************************** | ||
9 | # | ||
10 | # This file tests the triggers of views. | ||
11 | # | ||
12 | |||
13 | set testdir [file dirname $argv0] | ||
14 | source $testdir/tester.tcl | ||
15 | ifcapable {!trigger} { | ||
16 | finish_test | ||
17 | return | ||
18 | } | ||
19 | |||
20 | # Ticket #844 | ||
21 | # | ||
22 | do_test trigger5-1.1 { | ||
23 | execsql { | ||
24 | CREATE TABLE Item( | ||
25 | a integer PRIMARY KEY NOT NULL , | ||
26 | b double NULL , | ||
27 | c int NOT NULL DEFAULT 0 | ||
28 | ); | ||
29 | CREATE TABLE Undo(UndoAction TEXT); | ||
30 | INSERT INTO Item VALUES (1,38205.60865,340); | ||
31 | CREATE TRIGGER trigItem_UNDO_AD AFTER DELETE ON Item FOR EACH ROW | ||
32 | BEGIN | ||
33 | INSERT INTO Undo SELECT 'INSERT INTO Item (a,b,c) VALUES (' | ||
34 | || coalesce(old.a,'NULL') || ',' || quote(old.b) || ',' || old.c || ');'; | ||
35 | END; | ||
36 | DELETE FROM Item WHERE a = 1; | ||
37 | SELECT * FROM Undo; | ||
38 | } | ||
39 | } {{INSERT INTO Item (a,b,c) VALUES (1,38205.60865,340);}} | ||
40 | |||
41 | integrity_check trigger5-99.9 | ||
42 | |||
43 | finish_test | ||