SQLite

View Ticket
Login
Ticket Hash: b1d8c79314f59383e1952f2003395b3220398ec9
Title: LIKE malfunctions for INT PRIMARY KEY COLLATE NOCASE column
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Code_Generator Resolution: Fixed
Last Modified: 2019-06-10 13:52:52
Version Found In:
User Comments:
mrigger added on 2019-06-10 11:28:29:

Consider the following example:

CREATE TABLE t0(c0 INT PRIMARY KEY COLLATE NOCASE);
INSERT INTO t0 VALUES (' 1-');
SELECT * FROM t0 WHERE t0.c0 LIKE ' 1-'; -- expected: ' 1-', actual: no row is fetched

Unexpectedly, no row is fetched, even though the WHERE condition should evaluate to 1:

SELECT t0.c0 LIKE (' 1-') FROM t0; -- 1


dan added on 2019-06-10 13:52:52:

Fixed by [94b58ab0].