SQLite

View Ticket
Login
Ticket Hash: 771fe61761260c704bf6abf53f286a1daad0b513
Title: FTS5 integrity-check results in "database disk image is malformed" for UTF-16 encoding and SUBSTR
Status: Closed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2020-01-02 16:24:33
Version Found In: 3.30.0
User Comments:
mrigger added on 2020-01-01 22:29:52:

Consider the following test case:

PRAGMA encoding = 'UTF16';
CREATE VIRTUAL TABLE vt0 USING fts5(c0);
INSERT INTO vt0 VALUES (SUBSTR(x'37', ''));
INSERT INTO vt0(vt0) VALUES('integrity-check'); -- database disk image is malformed

Unexpectedly, the integrity check fails with an error. This issue could be related to the open FTS4 bug [1dc432db3b].