SQLite

View Ticket
Login
2018-01-03
01:47
Add another test case (found by OSSFuzz) for the problem fixed in check-in [2846458a] and described by ticket [dc3f932f5a147771]. No changes to code. (check-in: 4165fae9 user: drh tags: trunk)
2018-01-02
18:11 Fixed ticket [dc3f932f]: Assertion fault doing a REPLACE with index on an expression. plus 5 other changes (artifact: c50c85c7 user: drh)
18:11
In the constraint resolution logic, be careful not to cache column values in registers whose initialization might be bypassed by an OP_NoConflict opcode. Fix for ticket [dc3f932f5a147771] reported by OSSFuzz. (check-in: 2846458a user: drh tags: trunk)
17:40 New ticket [dc3f932f] Assertion fault doing a REPLACE with index on an expression.. (artifact: efd28bca user: drh)

Ticket Hash: dc3f932f5a147771b0f370942cfe758fd85fcd4c
Title: Assertion fault doing a REPLACE with index on an expression.
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2018-01-02 18:11:20
Version Found In: 3.21.0
User Comments:
drh added on 2018-01-02 17:40:34:

The following SQL causes an assertion fault on the REPLACE statement:

CREATE TABLE t1(a INT PRIMARY KEY, b INT UNIQUE);
CREATE INDEX t1ab ON t1(a*b);
INSERT INTO t1(a,b) VALUES(1,2);
REPLACE INTO t1(a,b) VALUES(1,3);

This problem appears to go back to the introduction of indexes on expressions with SQLite release 3.9.0 on 2015-10-14. The problem was discovered by OSSFuzz.