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

JSON_VALUE doesn't escape quote

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.10
    • 10.2.11
    • JSON
    • None
    • Using official mariadb docker image

    Description

      Based on official example :

      SET @json='{ "x": [0,1], "y": "[0,1]", "z": "Mon\\\"t\\\"y" }';
      SELECT @json, JSON_VALUE(@json,'$.z');
      

      return :

      @json                                           JSON_VALUE(@json,'$.z')  
      ----------------------------------------------  -------------------------
      { "x": [0,1], "y": "[0,1]", "z": "Mon\"t\"y" }  Mon\"t\"y                
      

      as you can see Mon\"t\"y is not escape as it must be

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            tchiot.ludo Lu Do
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.