SQLite

View Ticket
Login
Ticket Hash: 265e935b26afe80fcceaff6c216484aa88d6c65e
Title: FTS pgsz option results in "database disk image is malformed" error
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-10-07 20:36:33
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-10-07 19:25:09: (text/x-fossil-wiki)
Consider the following test case:

<pre>
CREATE VIRTUAL TABLE vt0 USING fts5(a);
PRAGMA reverse_unordered_selects = true;
INSERT INTO vt0 VALUES('365062398'), (0), (0);
INSERT INTO vt0(vt0, rank) VALUES('pgsz', '3');
UPDATE vt0 SET a = 399905135; -- unexpected: database disk image is malformed
INSERT INTO vt1(vt1) VALUES('integrity-check');
</pre>

The integrity-check indicates that the database disk image is malformed, which is unexpected. I suspect the reason to be an issue with the pgsz option. If, for example, the pgsz value is set to 3, then the UPDATE never terminates.

mrigger added on 2019-10-07 19:26:40: (text/x-fossil-wiki)
Sorry, the INSERT should look like this:

<pre>
INSERT INTO vt1(vt1, rank) VALUES('pgsz', '38');
</pre>