diff options
author | dan <dan@noemail.net> | 2015-05-19 19:44:25 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2015-05-19 19:44:25 +0000 |
commit | dde548cb168b9a947149c3214464562be9542c55 (patch) | |
tree | 76fa8e02f273d7a2fb9cb259bf18159d3fd630bd /test/trigger1.test | |
parent | 815bd625c2d340528fd6779aeb5e946cd8ea12d2 (diff) | |
download | sqlite-dde548cb168b9a947149c3214464562be9542c55.tar.gz sqlite-dde548cb168b9a947149c3214464562be9542c55.zip |
Ensure that when the VM applies TEXT affinity to a value it discards any existing REAL or INTEGER value.
FossilOrigin-Name: f5d0ce80792d58ef424300f973f8876d835ed4ad
Diffstat (limited to 'test/trigger1.test')
-rw-r--r-- | test/trigger1.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/trigger1.test b/test/trigger1.test index 1ebe12c89..a190efd46 100644 --- a/test/trigger1.test +++ b/test/trigger1.test @@ -712,4 +712,20 @@ do_test trigger1-16.7 { } } {1 {the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers}} +#------------------------------------------------------------------------- +# Test that bug [34cd55d68e0e6e7c] has been fixed. +# +do_execsql_test trigger1-17.0 { + CREATE TABLE t17a(ii INT); + CREATE TABLE t17b(tt TEXT PRIMARY KEY, ss); + CREATE TRIGGER t17a_ai AFTER INSERT ON t17a BEGIN + INSERT INTO t17b(tt) VALUES(new.ii); + END; + CREATE TRIGGER t17b_ai AFTER INSERT ON t17b BEGIN + UPDATE t17b SET ss = 4; + END; + INSERT INTO t17a(ii) VALUES('1'); + PRAGMA integrity_check; +} {ok} + finish_test |