Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13594

Support for JSON operators column->path and column->>path

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • compat80, JSON
    • 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

          Activity

            People

              Unassigned Unassigned
              ilya Илья Индиго
              Votes:
              14 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.