/ View Ticket
Login
Ticket Hash: c7a11719072efe4430b1361b5dd18a095cbc23ee
Title: WHERE clause erroneously influences value of fetched column from view
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-08-17 19:14:57
Version Found In: 3.29.0
User Comments:
mrigger added on 2019-08-17 18:05:28: (text/x-fossil-wiki)
Consider the following test case:

<pre>
CREATE TABLE t0(c0);
CREATE VIEW v0(c0) AS SELECT LOWER(CAST('1e500' AS TEXT)) FROM t0;
INSERT INTO t0(c0) VALUES (NULL);
SELECT v0.c0 FROM v0, t0 WHERE t0.rowid NOT IN (0, 0, v0.c0); -- expected: '1e500', actual: Inf
</pre>

I think that the conversion to a floating-point number should not be performed, as with the same query without the WHERE clause:

<pre>
SELECT v0.c0 FROM v0, t0; -- '1e500'
</pre>

dan added on 2019-08-17 19:14:57: (text/x-fossil-wiki)
Fixed by [43e8b143].