SQLite

View Ticket
Login
Ticket Hash: 3182d3879020ef3b2e6db56be2470a0266d3c773
Title: COLLATE nocase index on a WITHOUT ROWID table malfunctions
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-04-29 13:50:29
Version Found In: 3.28.0
User Comments:
drh added on 2019-04-28 15:07:09:

The following sequence of SQL statements results in a corrupt index:

CREATE TABLE test (c1 TEXT PRIMARY KEY) WITHOUT ROWID;
CREATE INDEX index_0 ON test(c1 COLLATE NOCASE);
INSERT INTO test(c1) VALUES ('A');
INSERT INTO test(c1) VALUES ('a');
PRAGMA integrity_check;

This problem goes all the way back to the introduction of WITHOUT ROWID tables in version 3.8.2 (2013-12-06). The problem was reported on the mailing list by Manuel Rigger.