SQLite

View Ticket
Login
2018-02-13
16:35 Fixed ticket [d6ec09ec]: Assertion fault in FTS4 plus 5 other changes (artifact: 3f87a311 user: drh)
16:21
Ensure that multiple updates of the same FTS4 row (i.e. the row with the same rowid) within a single transaction are written to separate segments. Fix for [d6ec09ec]. (check-in: d2a81a37 user: dan tags: trunk)
16:12 New ticket [d6ec09ec] Assertion fault in FTS4. (artifact: e62a329a user: drh)

Ticket Hash: d6ec09eccf68cfcac6a05b4ee054be1c1b8a8f6e
Title: Assertion fault in FTS4
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2018-02-13 16:35:22
Version Found In: 3.22.0
User Comments:
drh added on 2018-02-13 16:12:09:

The following SQL generates an assertion fault in FTS4:

CREATE VIRTUAL TABLE ft USING fts4(a, b, c);
INSERT INTO ft(rowid, a, b, c) VALUES(1, 'unus duo', NULL, NULL);
INSERT INTO ft(rowid, a, b, c) VALUES(2, NULL, NULL, NULL);
BEGIN;
  UPDATE ft SET b='septum' WHERE rowid = 1;
  UPDATE ft SET c='octo' WHERE rowid = 1;
COMMIT;

Bisecting shows that this problem first appeared with check-in [a1d08fd3d0419da8] on 2015-09-29 and was released with version 3.9.0.

This is a simplification of a problem discovered in the wild and reported to SQLite developers through private channels.