Bug #88812 JSON does not preserve zero fraction floats when manipulated
Submitted: 7 Dec 2017 12:16 Modified: 8 Dec 2017 8:49
Reporter: Martin Skovvang Petersen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: JSON Severity:S3 (Non-critical)
Version:8.0.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: FLOAT, json

[7 Dec 2017 12:16] Martin Skovvang Petersen
Description:
When manipulation a JSON column containing zero fraction floats, the floats are casted to integers.

How to repeat:
SET @j = '[1.0]';
SELECT JSON_ARRAY_APPEND(@j, '$', 2.0);

Expected results:

[1.0, 2.0]

Actual results:

[1, 2.0]

Notice how 1.0 is changed to 1 while 2.0 preserve.
[7 Dec 2017 13:01] Martin Skovvang Petersen
Update tags.
[8 Dec 2017 8:39] Knut Anders Hatlen
Thanks for the bug report, Martin. This looks like the same problem as bug#88230, which should be fixed in the upcoming version 8.0.4. Closing this bug as a duplicate.
[8 Dec 2017 8:49] Martin Skovvang Petersen
You're right - it appears the be the same issue. Thanks for a prompt answer.