/ Ticket Change Details
Login
Overview

Artifact ID: 7f88fd969c22521cbf0a0d61eec19eddd3863d12
Ticket: 1b266395d6bc1041dbd907194539b2b81b7af1e2
INSERT OR REPLACE with a foreign key constraint leads to assertion fault
User & Date: drh 2015-09-30 12:10:31
Changes

  1. Change foundin to "3.8.11.1"
  2. Change icomment to:

    The following script causes an assertion fault:

    PRAGMA foreign_keys=1;
    CREATE TABLE Foo (Id INTEGER PRIMARY KEY, ParentId INTEGER REFERENCES Foo(Id) ON DELETE CASCADE, C1);
    INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (1, null, 'A');
    INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (2, 1, 'A-2-1');
    INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (3, 2, 'A-3-2');
    INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (4, 3, 'A-4-3');
    INSERT OR REPLACE INTO Foo(Id, ParentId, C1) VALUES (2, 3, 'A-2-3');
    

    This problem appears to have been introduced with version 3.8.4, specifically at check-in [56bc5ce8958c8e625].

  3. Change login to "drh"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change severity to "Severe"
  6. Change status to "Open"
  7. Change title to:

    INSERT OR REPLACE with a foreign key constraint leads to assertion fault

  8. Change type to "Code_Defect"