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

JSON_CONTAINS and JSON_EQUALS do not compare string based on semantic

    XMLWordPrintable

Details

    • Unexpected results
    • Because JSON_CONTAINS and JSON_EQUALS did not compare JSON arguments based on string semantic, the equalities of differing representations were missed; fix thanks to Geng Tian

    Description

      Hi,

      I found that JSON_CONTAINS and JSON_EQUALS do not compare strings based on string semantics. This is an example:

      SELECT JSON_CONTAINS('"A"', '"\\u0041"'); -- 0
      SELECT JSON_CONTAINS('"\\u0041"', '"A"'); -- 0
      SELECT JSON_OVERLAPS('"A"', '"\\u0041"'); -- 0
      SELECT JSON_EQUALS('"A"', '"\\u0041"'); -- 0
      SELECT JSON_UNQUOTE('"A"') = JSON_UNQUOTE('"\\u0041"'); -- 1
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              ChiZhang Chi Zhang
              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.