Bug #103709 export data of double field failed to import when it is double's lower boundary
Submitted: 15 May 2021 9:13 Modified: 3 Jun 2021 18:31
Reporter: Qilu Wei Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Types Severity:S3 (Non-critical)
Version:8.0.25 OS:Any
Assigned to: CPU Architecture:Any

[15 May 2021 9:13] Qilu Wei
Description:
The export data of double field failed to import when it is double's lower boundary (-1.7976931348623157e308), while it succeed in 8.0.18 and previous version.

How to repeat:
mysql> create table t1 (a DOUBLE);
Query OK, 0 rows affected (0.04 sec)

mysql> insert into t1 values (-1.7976931348623157e308);
Query OK, 1 row affected (0.01 sec)

mysql> select * from t1;
+-------------------------+
| a                       |
+-------------------------+
| -1.7976931348623157e308 |
+-------------------------+
1 row in set (0.00 sec)

mysql> select concat(a) from t1;
+------------------------+
| concat(a)              |
+------------------------+
| -1.797693134862316e308 |
+------------------------+
1 row in set (0.00 sec)

mysql> select * from t1 into outfile '~/decimal.dat';
Query OK, 1 row affected (0.00 sec)

mysql> load data infile '~/decimal.dat' into table t1;
ERROR 1264 (22003): Out of range value for column 'a' at row 1

$ cat ~/decimal.dat
-1.797693134862316e308
[15 May 2021 22:30] MySQL Verification Team
Thank you for the bug report. Verified as described with 8.0.25 and 8.0.18.
[3 Jun 2021 18:31] Paul DuBois
Posted by developer:
 
Fixed in 8.0.26.

For conversion of -DBL_MAX to string and back to double, the new
double value differed from the original and was rejected as out of
bounds.