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

JSON_EXTRACT() returns quotes with strings

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.3.13
    • N/A
    • JSON
    • None
    • Windows 10, PHP 7.3

    Description

      When working with JSON_EXTRACT() on a path who's value is a string, the function returns the enclosing quotes which are part of the JSON syntax rather than actually part of the value.

      SELECT JSON_EXTRACT('{"test":"hi"}', '$.test') AS test
      

      +------+
      | test |
      +------+
      | "hi" |
      +------+
      1 row in set (0.000 sec)
      

      Expected Result:

      +------+
      | test |
      +------+
      | hi |
      +------+
      1 row in set (0.000 sec)
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            noyearzero Ryan Leadenham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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