Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
Function JSON_EXTRACT() in MariaDB 10.2.x don't support column->path and column->>path operators that are supported in MySQL since version 5.7.13.
https://mariadb.com/kb/en/mariadb/json_extract
More details about syntax and examples here.
It work and in MySQL and in MariaDB.
SELECT JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name') `name`; |
SELECT JSON_UNQUOTE(JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name')) `name`; |
It work only in MySQL.
SELECT '{"id":"1", "name":"Name"}'->'$.name' `name`; |
SELECT '{"id":"1", "name":"Name"}'->>'$.name' `name`; |
https://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html#operator_json-column-path
https://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html#operator_json-inline-path
Because of this issue, I can't transparent migrate all my projects from MySQL to MariaDB.
Attachments
Issue Links
- duplicates
-
MDEV-18530 Support -> and ->> operators
- Closed
- is part of
-
MDEV-28906 MySQL 8.0 desired compatibility
- Open