/ View Ticket
Login
2014-08-21
16:09
Merge all recent trunk changes, especially the fix for ticket [369d57fb8e5ccdff06f1], but also the skip-scan improvement and performance improvements in the b-tree code. (check-in: 0b9e2c32 user: drh tags: sessions)
15:57 Fixed ticket [369d57fb]: DELETE with TRIGGER causes an assertion fault plus 5 other changes (artifact: 5709eef0 user: drh)
14:10
Fix a faulty assert() statement. Add comments to clarify the behavior of the sqlite3OpenTableAndIndices() routine in insert.c. Add test cases to verify that the assert() statement is not firing inappropriately. Ticket [369d57fb8e5ccdff06f1]. (check-in: 7029b340 user: drh tags: trunk)
12:32 New ticket [369d57fb] DELETE with TRIGGER causes an assertion fault. (artifact: 40e9c6f0 user: drh)

Ticket Hash: 369d57fb8e5ccdff06f197a37147a88f9de95cda
Title: DELETE with TRIGGER causes an assertion fault
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2014-08-21 15:57:30
Version Found In: 3.8.6
User Comments:
drh added on 2014-08-21 12:32:30:

The following SQL causes an assertion fault while running sqlite3_prepare() on the DELETE statement:

CREATE TABLE t1(x);
CREATE TABLE t2(y);
CREATE VIRTUAL TABLE t3 USING rtree(a,b,c);
CREATE TRIGGER t2del AFTER DELETE ON t2 WHEN (SELECT 1 from t1) BEGIN 
  DELETE FROM t3 WHERE a=old.y; 
END;
DELETE FROM t2 WHERE y=1;

The problem appears to have been introduced by the addition of support for WITHOUT ROWID tables in SQLite version 3.8.2, specifically on check-in [c80e229dd9c1230a] on 2013-11-07.