Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
-
None
-
Linux Mint 20.3 (Una)
Docker 20.10.12
Description
MariaDB has a non-standard syntaxe for JSON_OBJECT, and also does not accept the standard syntaxe (as defined in ISO/IEC 9075:2016):
Example 1:
select json_object('first_name', 'John', 'last_name', 'Doe'); |
MariaDB Result:
{"last_name": "Doe", "first_name": "John"}MySQL Result:
{"last_name": "Doe", "first_name": "John"}Example 2:
select json_object('first_name': 'John', 'last_name': 'Doe'); |
MariaDB Result: not works (You have an error in your SQL syntax)
MySQL Result: not works (bad SQL grammar)
- Example 3:
select json_object(key 'first_name' value 'John', key 'last_name' value 'Doe'); |
MariaDB Result: not works (You have an error in your SQL syntax)
MySQL Result: not works (bad SQL grammar)
It would be nice to have MariaDB support the standard json_object syntaxe.
https://github.com/h2database/h2database/issues/3575
https://en.wikipedia.org/wiki/SQL:2016
https://www.iso.org/standard/78937.html?browse=tc