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

JSON_EXTRACT finds a non-ASCII key in a VARBINARY document, JSON_EXISTS does not

    XMLWordPrintable

Details

    Description

      Reproduced on 10.11.19 (debug build):

      CREATE TABLE t (b VARBINARY(60));
      INSERT INTO t VALUES ('{"é":1}');
       
      SELECT JSON_EXTRACT(b, '$.é'), JSON_EXISTS(b, '$.é') FROM t;   -- 1, 0

      JSON_EXTRACT reads the value while JSON_EXISTS denies that the path exists. Expected: both agree. In an utf8mb4 column with the same document, JSON_EXTRACT also returns 1.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              chunlingqin chunlingqin
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.