Bug #77733 Make JSON updating functions treat SQL NULL as JSON null

Submitted: 15 Jul 2015 14:36 Modified: 11 Aug 2015 15:58
Reporter: Rick Hillegas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: JSON Severity:S3 (Non-critical)
Version:5.7.9 OS:Any
Assigned to: CPU Architecture:Any

[15 Jul 2015 14:36] Rick Hillegas
Description:
JSON_OBJECT() and JSON_ARRAY() treat SQL NULL values as JSON nulls. To be consistent, we should make JSON_APPEND(), JSON_SET(), JSON_REPLACE(), and JSON_INSERT() do the same. So, for instance...

  JSON_INSERT( doc, '$', NULL )

...would be equivalent to...

  JSON_INSERT( doc, '$', CAST( NULL AS JSON ) )

How to repeat:
See above description of the bug.
[11 Aug 2015 15:58] Paul DuBois
Noted in 5.7.9, 5.8.0 changelogs.

The JSON value-updating functions JSON_APPEND(), JSON_SET(),
JSON_REPLACE(), and JSON_INSERT() now treat SQL NULL values as JSON
null literals, which is consistent with JSON_OBJECT() and
JSON_ARRAY().

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

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