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

json_overlaps() does not check nested key-value pair correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.9
    • Fix Version/s: 10.9.2, 10.10.1
    • Component/s: JSON
    • Labels:
      None

      Description

      This bug was pointed out by GSoC student working on JSON_INTERSECT().
      JSON_OVERLAPS() does not check entire value for nested keys.

      SET @json1 = '{"kk":{"k1":"v1","k2":"v2"}}';
      SET @json2 = '{"kk":{"k1":"v1","k2":"v2","k3":"v3"}}';
      Example:
      SELECT JSON_OVERLAPS(@json2, @json1);
      JSON_OVERLAPS(@json2, @json1)
      1

      vs

      SELECT JSON_OVERLAPS(@json1, @json2);
      JSON_OVERLAPS(@json1, @json2)
      0

      Both should give 0

        Attachments

          Activity

            People

            Assignee:
            rucha174 Rucha Deodhar
            Reporter:
            rucha174 Rucha Deodhar
            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.