JSON NULL handling
Posted by: Philippe Riand
Date: October 29, 2018 06:54PM

Looks like JSON null handling changed, as some of our code using MySQL 8 from last year doesn't work anymore with the latest 8.0.13. Not sure what version broke it though.

It looks like a JSON value of 'null' is not returned as 'NULL' anymore. See the sample SQL bellow, easy to reproduce from the workbench:

SET @doc = JSON_OBJECT('a', NULL);
SELECT JSON_UNQUOTE(JSON_EXTRACT(@doc,"$.a")) as C1,
JSON_UNQUOTE(JSON_EXTRACT(@doc,"$.b")) as C2;

C2 is effectively set as NULL, but C1 is returned as the 4 char 'null' string.

Options: ReplyQuote


Subject
Views
Written By
Posted
JSON NULL handling
136
October 29, 2018 06:54PM
21
January 03, 2019 02:54AM
13
January 03, 2019 07:24AM
16
January 03, 2019 08:28PM


Sorry, only registered users may post in this forum.

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.