SQLite

View Ticket
Login
Ticket Hash: 1258875e07553c989030934c1125afdf5c79e99b
Title: Undefined collating sequence on LIKE causes segfault
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2010-01-21 23:13:44
15.45 years ago
Created: 2010-01-21 23:05:32
15.45 years ago
Version Found In:
Description:
Suppose a table is created with a application-defined collating sequence:
    CREATE TABLE t1(x TEXT COLLATE appdef);

Then the same database is opened in a separate database connection where the "appdef" collating sequence is undefined. Then the column is used as the left-hand side of a LIKE operator:

    SELECT * FROM t1 WHERE x LIKE 'abc%';

This causes a segfault.

The problem appears to have been introduced by check-in [9854ad00aed08793ae7ba3c2cfbab7a2dba4dcb8] on 2009-10-22 which was part of release 3.6.20.


drh added on 2010-01-21 23:13:44:
Fixed by check-in [a82e6b4585b9ddba581204976cd5ea8704339185]. The test case is in TH3.