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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.9
    • 10.9.2, 10.10.1
    • JSON
    • 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

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