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

JSON_CONTAINS, JSON_EQUALS and JSON_OVERLAPS do not decode \uXXXX escapes before comparing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • None
    • N/A
    • JSON
    • None
    • Not for Release Notes

    Description

      Reproduced on 10.11.19 (debug build):

      SELECT JSON_CONTAINS('{"k":"\u0041"}', '{"k":"A"}'),   -- 0
             JSON_EQUALS('"\u0041"', '"A"'),                 -- 0
             JSON_OVERLAPS('["\u0041"]', '["A"]'),           -- 0
             JSON_UNQUOTE('"\u0041"');                       -- A

      The same string written as an escape and written directly compare as different, although JSON_UNQUOTE on the same server decodes the escape to A. Expected: 1 / 1 / 1.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chunlingqin chunlingqin
              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.