Bug #109897 Field_double::val_str causes string truncation
Description:
8.0.25:https://github.com/mysql/mysql-server/commit/43bd3f91537bd0525d29079a3ecc2a9a20e42317
mysql> create table t2(`double_col` double DEFAULT NULL);
Query OK, 0 rows affected (0.08 sec)
mysql> insert into t2 values(-2.2250738585072014e-308);
Query OK, 1 row affected (0.01 sec)
mysql> select rtrim(double_col) from t2 group by 1;
+-----------------------+
| rtrim(double_col) |
+-----------------------+
| -2.2250738585072e-308 |
+-----------------------+
1 row in set (0.00 sec)
8.0.27:https://github.com/mysql/mysql-server/commit/c0fddf62e4963351fc08f914aad8f37b871fe1ab
mysql> create table t2(`double_col` double DEFAULT NULL);
Query OK, 0 rows affected (0.08 sec)
mysql> insert into t2 values(-2.2250738585072014e-308);
Query OK, 1 row affected (0.01 sec)
mysql> select rtrim(double_col) from t2 group by 1;
+------------------------+
| rtrim(double_col) |
+------------------------+
| -2.2250738585072014e-3 |
+------------------------+
1 row in set (0.00 sec)
How to repeat:
mysql> create table t2(`double_col` double DEFAULT NULL);
Query OK, 0 rows affected (0.08 sec)
mysql> insert into t2 values(-2.2250738585072014e-308);
Query OK, 1 row affected (0.01 sec)
mysql> select rtrim(double_col) from t2 group by 1;
+------------------------+
| rtrim(double_col) |
+------------------------+
| -2.2250738585072014e-3 |
+------------------------+
1 row in set (0.00 sec)
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.