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

JSON_EXTRACT fails with some escaped unicode as key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 10.2.5
    • Fix Version/s: 10.2.8
    • Component/s: JSON
    • Labels:
    • Environment:
      Ubuntu 17.04

      Description

      JSON_EXTRACT fails to handle specific escaped unicode sequence. Here is a example:

      SET @str = "{\"\\u00e4\\u00f6\":\"yes\"}";
      SET @path = "$.\"\\u00e4\\u00f6\"";
      select @str, @path, JSON_EXTRACT(@str, @path);
      

      Here JSON extract returns null. I've testet the same code on mysql and it works fine. The next example, containing only the first unicode character runs fine on mariadb and mysql.

      SET @str = "{\"\\u00e4\":\"yes\"}";
      SET @path = "$.\"\\u00e4\"";
      select @str, @path, JSON_EXTRACT(@str, @path);
      

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            apreiml Armin Preiml
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: