Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.11, 11.4, 11.8, 12.0(EOL), 10.11.14
-
OS: Red Hat Enterprise Linux release 8.10 (Ootpa) 4.18.0,
MariaDB: 10.11.14-MariaDB-log
-
Unexpected results
-
Correct return value of JSON_VALUE which in the previous release, incorrectly converted a valid empty string return value to a NULL. This has been reverted to correct behaviour.
Description
Given the following JSON object:
SET @jobject = JSON_OBJECT("a", "");
|
When querying the value of key "a", up to MariaDB 10.11.13 we get an empty string:
MariaDB [(none)]> SELECT @@VERSION, JSON_VALUE(@jobject, '$.a') AS j_value;
|
+----------------------+---------+
|
| @@VERSION | j_value |
|
+----------------------+---------+
|
| 10.11.13-MariaDB-log | |
|
+----------------------+---------+
|
1 row in set (0.000 sec)
|
Now, with MariaDB 10.11.14 we get NULL:
MariaDB [(none)]> SELECT @@VERSION, JSON_VALUE(@jobject, '$.a') AS j_value;
|
+----------------------+---------+
|
| @@VERSION | j_value |
|
+----------------------+---------+
|
| 10.11.14-MariaDB-log | NULL |
|
+----------------------+---------+
|
1 row in set (0.000 sec)
|
The same change applies for JSON objects stored in a tables.
Since the release notes of 10.11.14 do not mention any changes for the JSON component related to this change, I suspect this to be a bug, not a bug fix.
Attachments
Issue Links
- is duplicated by
-
MDEV-37701 JSON with empty string is parsed as null since last releases
-
- Closed
-
- relates to
-
MDEV-36765 JSON histograms cannot handle >1 byte characters from 10.11.12
-
- Closed
-