SQLite

View Ticket
Login
Ticket Hash: 167b2aac34bf39208680f0bafa9d30c01e683a4e
Title: Debug assertion fts5CheckTransactionState: Assertion `iSavepoint<=p->ts.iSavepoint' failed
Status: Closed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-26 14:37:27
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-24 23:26:52:

Consider the following test case:

CREATE VIRTUAL TABLE vt0 USING fts5(c0);
CREATE VIRTUAL TABLE vt1 USING fts4(c0);
INSERT INTO vt1(c0) VALUES(0);
BEGIN;
UPDATE vt1 SET c0 = 0;
INSERT INTO vt1(c0) VALUES (0), (0);
UPDATE vt0 SET c0 = 0;
INSERT INTO vt1(c0) VALUES (0);
UPDATE vt1 SET c0 = 0;
INSERT INTO vt1(vt1) VALUES('automerge=1');
UPDATE vt1 SET c0 = 0;
DROP TABLE vt1; -- sqlite3.c:219981: fts5CheckTransactionState: Assertion `iSavepoint<=p->ts.iSavepoint' failed

When compiling with -DSQLITE_DEBUG, the DROP TABLE triggers an assertion error.