1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Minor changes made while planning a larger change.

FossilOrigin-Name: 84097a4c759b1d65890af885f137d3cb16eef584
This commit is contained in:
dan
2011-05-28 15:57:40 +00:00
parent 98b08e71f2
commit 382874fc5c
8 changed files with 191 additions and 126 deletions

View File

@ -274,6 +274,34 @@ ifcapable compound&&attach {
set ::update_hook
} [list]
}
do_test hook-4.4 {
execsql {
CREATE TABLE t4(a UNIQUE, b);
INSERT INTO t4 VALUES(1, 'a');
INSERT INTO t4 VALUES(2, 'b');
}
set ::update_hook [list]
execsql {
REPLACE INTO t4 VALUES(1, 'c');
}
set ::update_hook
} [list INSERT main t4 3 ]
do_execsql_test hook-4.4.1 {
SELECT * FROM t4 ORDER BY a;
} {1 c 2 b}
do_test hook-4.4.2 {
set ::update_hook [list]
execsql {
PRAGMA recursive_triggers = on;
REPLACE INTO t4 VALUES(1, 'd');
}
set ::update_hook
} [list INSERT main t4 4 ]
do_execsql_test hook-4.4.3 {
SELECT * FROM t4 ORDER BY a;
} {1 d 2 b}
db update_hook {}
#
#----------------------------------------------------------------------------