Bug #70576 JSON_REPLACE returns invalid JSON
Submitted: 9 Oct 2013 19:50 Modified: 6 Nov 2013 18:53
Reporter: Sveta Smirnova Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: JSON User-defined function ( UDF ) Severity:S3 (Non-critical)
Version:0.2 OS:Any
Assigned to: Assigned Account
Triage: Needs Triage: D2 (Serious) / R3 (Medium) / E3 (Medium)

[9 Oct 2013 19:50] Sveta Smirnova
Description:
JSON_REPLACE returns invalid JSON for certain queries.

How to repeat:
mysql>  select json_replace('{"a":[1]}', "a", "b");
+-------------------------------------+
| json_replace('{"a":[1]}', "a", "b") |
+-------------------------------------+
| {"a":b                              |
+-------------------------------------+
1 row in set (0.00 sec)

mysql>  select json_replace('{"a":[1]}', "a", '{"b":"c"}');
+---------------------------------------------+
| json_replace('{"a":[1]}', "a", '{"b":"c"}') |
+---------------------------------------------+
| {"a":{"b":"c"}                              |
+---------------------------------------------+
1 row in set (0.00 sec)
[6 Nov 2013 18:53] Sveta Smirnova
Duplicate of bug #70486