SQLite

View Ticket
Login
2014-06-27
02:23 Fixed ticket [9a8b09f8]: Affinity problem on "x IN (?)" plus 5 other changes (artifact: a198df4d user: drh)
2014-06-26
21:28
Revise the affinity returned for expressions flagged as 'generic'. Fix for [9a8b09f8e6]. (check-in: 92f7ad43 user: mistachkin tags: trunk)
14:46 New ticket [9a8b09f8] Affinity problem on "x IN (?)". (artifact: 7a0caf42 user: drh)

Ticket Hash: 9a8b09f8e69d3d9dbd4c0b13e19a97c916e657c2
Title: Affinity problem on "x IN (?)"
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2014-06-27 02:23:36
Version Found In: 3.8.5
User Comments:
drh added on 2014-06-26 14:46:12:

In the following SQL command sequence, query 3 returns no results when it should return "1":

CREATE TABLE t1(v text);
INSERT INTO t1 VALUES('1'),('2');
SELECT 1, v FROM t1 WHERE v=1;
SELECT 2, v FROM t1 WHERE v='1';
SELECT 3, v FROM t1 WHERE v IN (1);
SELECT 4, v FROM t1 WHERE v IN ('1');
SELECT 5, v FROM t1 WHERE v IN (1,2);
SELECT 6, v FROM t1 WHERE v IN ('1','2');

This problem was reported on the mailing list by Guillaume Fougnies. It appears to have been introduced by check-in [2ea4a9f75f46eaa928ba] on 2014-03-20 and was released in version 3.8.5.