SQLite

View Ticket
Login
2014-03-24
15:02 Fixed ticket [a8a0d299]: Incorrect column data type reported plus 3 other changes (artifact: 7badd139 user: drh)
15:00
Fix arithmetic operators so that they do not change the affinity of their input operands. Ticket [a8a0d2996a]. (check-in: 221f8f94 user: drh tags: trunk)
12:55 Ticket [a8a0d299] Incorrect column data type reported status still Open with 4 other changes (artifact: a8a9f0a1 user: drh)
12:33
Cancel column-cache entries that are involved in a comparison operator since the comparison might have forced an affinity change. Originally proposed as a fix for ticket [a8a0d2996a], but later determined to be incorrect. (Closed-Leaf check-in: 0b95b7a8 user: drh tags: tkt-a8a0d2996a)
11:32 Ticket [a8a0d299] Incorrect column data type reported status still Open with 6 other changes (artifact: 533558fc user: drh)
09:18 New ticket [a8a0d299]. (artifact: c40b3fef user: dan)

Ticket Hash: a8a0d2996a2b229f8aaf702da267f05d80a1b1bb
Title: Incorrect column data type reported
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2014-03-24 15:02:18
Version Found In: 3.8.3, 3.8.4, trunk
User Comments:
dan added on 2014-03-24 09:18:48:

SQLite version 3.8.5 2014-03-22 02:19:53
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> create table t(x);
sqlite> insert into t values('1');
sqlite> select typeof(x) from t;
text
sqlite> select typeof(x) from t where x=x+0;
integer
sqlite> 

Introduced by [58704ed1f4cd78bb].


drh added on 2014-03-24 12:55:14:

Another example script:

CREATE TABLE t(x,y);
INSERT INTO t VALUES('1','1');
SELECT typeof(x), typeof(y) FROM t WHERE 1=x+0 AND y=='1';