Bug #5931 | Traditional: FLOAT and DOUBLE out-of-range values are accepted | ||
---|---|---|---|
Submitted: | 6 Oct 2004 18:05 | Modified: | 1 Apr 2005 9:38 |
Reporter: | Trudy Pelzer | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
Version: | 5.0.2-alpha-debug | OS: | Linux (SuSE 9.1) |
Assigned to: | CPU Architecture: | Any |
[6 Oct 2004 18:05]
Trudy Pelzer
[6 Oct 2004 18:57]
MySQL Verification Team
Verified against latest BK source tree.
[1 Apr 2005 9:38]
Michael Widenius
For the moment we are not handling underflows in float/double in MySQL This is something we will consider for future MySQL versions
[11 Nov 2017 18:37]
Federico Razzoli
Identical (except for last query's approximation) in 8.0.3: mysql> set sql_mode='traditional'; Query OK, 0 rows affected (0.00 sec) mysql> create table t1 (col1 float); Query OK, 0 rows affected (0.27 sec) mysql> insert into t1 values (-1.1e-39); Query OK, 1 row affected (0.05 sec) mysql> insert into t1 values (-1.1e-40); Query OK, 1 row affected (0.05 sec) mysql> select* from t1; +--------------+ | col1 | +--------------+ | -1.1e-39 | | -1.10001e-40 | +--------------+ 2 rows in set (0.00 sec) mysql> create table t2 (col1 double precision); Query OK, 0 rows affected (0.25 sec) mysql> insert into t2 values (-2.2e-309); Query OK, 1 row affected (0.04 sec) mysql> insert into t2 values (-2.2e-310); Query OK, 1 row affected (0.05 sec) mysql> select * from t2; +-----------+ | col1 | +-----------+ | -2.2e-309 | | -2.2e-310 | +-----------+ 2 rows in set (0.00 sec)