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

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

Details

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

          rucha174 Rucha Deodhar created issue -
          rucha174 Rucha Deodhar made changes -
          Field Original Value New Value
          Affects Version/s 10.9 [ 26905 ]
          rucha174 Rucha Deodhar made changes -
          Fix Version/s 10.9 [ 26905 ]
          rucha174 Rucha Deodhar made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          rucha174 Rucha Deodhar made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          rucha174 Rucha Deodhar added a comment - Patch: https://github.com/MariaDB/server/commit/f253426346f5573178512c486d3ea0a23f3d2eeb
          rucha174 Rucha Deodhar made changes -
          Assignee Rucha Deodhar [ rucha174 ] Alexey Botchkov [ holyfoot ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          rucha174 Rucha Deodhar made changes -
          Assignee Alexey Botchkov [ holyfoot ] Oleksandr Byelkin [ sanja ]
          rucha174 Rucha Deodhar made changes -
          Assignee Oleksandr Byelkin [ sanja ] Alexey Botchkov [ holyfoot ]

          ok to push with few corrections in the patch comment.

          holyfoot Alexey Botchkov added a comment - ok to push with few corrections in the patch comment.
          holyfoot Alexey Botchkov made changes -
          Assignee Alexey Botchkov [ holyfoot ] Rucha Deodhar [ rucha174 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          rucha174 Rucha Deodhar made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          rucha174 Rucha Deodhar made changes -
          Component/s JSON [ 13908 ]
          Fix Version/s 10.9.2 [ 27115 ]
          Fix Version/s 10.10.1 [ 27913 ]
          Fix Version/s 10.9 [ 26905 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]

          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.