Bug #81283 JSON replace or merge_replace function

Submitted: 2 May 2016 14:24 Modified: 1 Aug 2017 6:07
Reporter: Manyi Lu Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: JSON Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: json, merge, sql functions

[2 May 2016 14:24] Manyi Lu
Description:
Michael Slowik requested this feature at MySQL Innovation Day.
 	

JSON_MERGE('{ "a": 1, "b":2 }','{ "a": 3, "c":4 }');
returns { "a": [1,3], "b":2, "c": 4}

He wants a JSON_Merge_Replace function.
JSON_Merge_Replace('{ "a": 1, "b":2}','{ "a": 3, "c":4 }');
returns '{ "a": 3, "b":2, "c": 4}'

How to repeat:
JSON_MERGE('{ "a": 1, "b":2 }','{ "a": 3, "c":4 }');
returns { "a": [1,3], "b":2, "c": 4}

He wants a JSON_Merge_Replace function.
JSON_Merge_Replace('{ "a": 1, "b":2}','{ "a": 3, "c":4 }');
returns '{ "a": 3, "b":2, "c": 4}'
[10 May 2016 4:56] MySQL Verification Team
Hello Manyi Lu,

Thank you for the reasonable feature request!

Thanks,
Umesh
[1 Aug 2017 6:07] Jon Stephens
Fixed in MySQL 8.0.3 through addition of JSON_MERGE_PATCH() function and renaming of JSON_MERGE() to JSON_MERGE_PRESERVE().

Closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 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.