Bug #118497 When inserting floating-point data into JSON type, the query result precision is incorrect.
Submitted: 23 Jun 1:11 Modified: 23 Jun 4:20
Reporter: Alice Alice Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.41 OS:Any
Assigned to: CPU Architecture:Any
Tags: json

[23 Jun 1:11] Alice Alice
Description:
 When inserting floating-point data into JSON type, the query result precision is incorrect. 

How to repeat:
mysql> CREATE TABLE `test1` (
    -> `id` int NOT NULL AUTO_INCREMENT,
    -> `json_col` json DEFAULT NULL,
    -> PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)

mysql> insert into test1(json_col) values('{"id": 206, "name": "Str_9b8fae68", "value": 0.43434838152895533}');
Query OK, 1 row affected (0.01 sec)

mysql> select * from test1;
+----+------------------------------------------------------------------+
| id | json_col                                                         |
+----+------------------------------------------------------------------+
|  1 | {"id": 206, "name": "Str_9b8fae68", "value": 0.4343483815289554} |
+----+------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>
[23 Jun 1:17] Alice Alice
Sorry, this is a duplicate bug.
see: https://bugs.mysql.com/bug.php?id=83954