SQLite

View Ticket
Login
2017-01-03
15:57
Fix the row-values in UPDATE statements within TRIGGER problem identified by ticket [8c9458e7]. (check-in: bf984e98 user: drh tags: branch-3.16)
13:37 Fixed ticket [8c9458e7]: row-value updates in triggers do not work. plus 5 other changes (artifact: 0395bbea user: drh)
01:24
Fix the row-values in UPDATE statements within TRIGGER problem identified by ticket [8c9458e7]. (check-in: f12ed3ce user: drh tags: trunk)
2017-01-02
22:36
Proposed fix for the row-value TRIGGER UPDATE problem described in ticket [8c9458e7]. (check-in: 61a442ea user: drh tags: rowvalue-update-trigger)
21:40 New ticket [8c9458e7] row-value updates in triggers do not work.. (artifact: 2e02cb7e user: drh)

Ticket Hash: 8c9458e703666e1a422c4ac808aaeeaa919474e0
Title: row-value updates in triggers do not work.
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2017-01-03 13:37:02
Version Found In: 3.16.0
User Comments:
drh added on 2017-01-02 21:40:30:

Row-value UPDATE statements inside of TRIGGERs cause segfaults, memory leaks, and/or assertion faults. Example:

CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3);
CREATE TABLE t2(x);
CREATE TRIGGER r2 AFTER INSERT ON t2 BEGIN
  UPDATE t1 SET (a,b,c)=(SELECT 4,5,6);
END;
INSERT INTO t2 VALUES(1);
SELECT * FROM t1;
SELECT * FROM t2;

This problem has existed ever since row value were added in version 3.15.0, about two months ago.