SQLite

View Ticket
Login
Ticket Hash: ba2f4585cf4952311cb5f089463573c52dca2751
Title: Query with ORDER BY results in "database disk image is malformed" error
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-07-29 06:07:05
Version Found In: 3.29.0
User Comments:
mrigger added on 2019-07-28 22:32:54: (text/x-fossil-wiki)
Consider the test case below:

<pre>
CREATE TABLE t0 (c0 REAL, c1);
CREATE UNIQUE INDEX i0 ON t0(c1, 0 | c0);
INSERT INTO t0(c0) VALUES (4750228396194493326), (0);
UPDATE OR REPLACE t0 SET c0 = 'a', c1 = '';
SELECT * FROM t0 ORDER BY t0.c1; -- unexpected: database disk image is malformed
</pre>

Unexpectedly, the query results in an error "database disk image is malformed".