SQLite

View Ticket
Login
2019-09-16
18:20 Fixed ticket [0f042809]: GLOB unexpectedly does not match plus 6 other changes (artifact: de4655d7 user: drh)
18:19
Do not attempt the LIKE optimization for non-text columns and a pattern prefix of "-". Ticket [0f0428096f17252a] (check-in: 6fe0367f user: drh tags: trunk)
2019-09-03
18:23 New ticket [0f042809] GLOB unexpectedly does not match. (artifact: 6afdb361 user: mrigger)

Ticket Hash: 0f0428096f17252a932169ce017328e24e0c4114
Title: GLOB unexpectedly does not match
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-09-16 18:20:06
Version Found In: 3.29.0
User Comments:
mrigger added on 2019-09-03 18:23:00:

In the following test case, a row is unexpectedly not fetched:

CREATE TABLE t0(c0 UNIQUE);
INSERT INTO t0 VALUES (-1);
SELECT * FROM t0 WHERE t0.c0 GLOB '-*'; -- unexpected: row is not fetched

The expression should evaluate to TRUE:

SELECT t0.c0 GLOB '-*' FROM t0; -- TRUE