SQLite

View Ticket
Login
Ticket Hash: 2841e99d104c6436c267f233c0ad2204fa151079
Title: Different rounding when converting TEXT to REAL
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-09-02 02:22:07
Version Found In: 3.29.0
User Comments:
mrigger added on 2019-09-01 18:44:32: (text/x-fossil-wiki)
In the test case below, a row is unexpectedly fetched.

<pre>
CREATE TABLE t0(c0 REAL UNIQUE);
INSERT INTO t0(c0) VALUES(2.07093491255203046E18);
SELECT * FROM t0 WHERE c0 IN ('2070934912552030444'); -- unexpected: row is fetched
</pre>

This is surprising, since the following evaluates to FALSE:
<pre>
SELECT c0 IN ('2070934912552030444') FROM t0; -- FALSE
</pre>