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

JSON_VALUE doesn't escape quote

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.10
    • Fix Version/s: 10.2.11
    • Component/s: JSON
    • Labels:
      None
    • Environment:
      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

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            tchiot.ludo Lu Do
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: