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

wrong result with json_overlaps when one of the arguments has an empty nested array element

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8, 12.3, 13.0, 13.1
    • 11.4
    • JSON
    • Unexpected results
    • Q4/2026 Server Maintenance

    Description

      probably affecting earlier versions too.

      MariaDB [test]> select json_overlaps('[[1]]', '[[]]');
      +--------------------------------+
      | json_overlaps('[[1]]', '[[]]') |
      +--------------------------------+
      |                              1 |
      +--------------------------------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> select json_overlaps('[[1]]', '[[],123]');
      +------------------------------------+
      | json_overlaps('[[1]]', '[[],123]') |
      +------------------------------------+
      |                                  1 |
      +------------------------------------+
      1 row in set (0.001 sec)
      
      

      MySQL 9.6:

      mysql>  select json_overlaps('[[1]]', '[[]]');
      +--------------------------------+
      | json_overlaps('[[1]]', '[[]]') |
      +--------------------------------+
      |                              0 |
      +--------------------------------+
      1 row in set (0.002 sec)
      

      mysql>  select json_overlaps('[[1]]', '[[],123]');
      +------------------------------------+
      | json_overlaps('[[1]]', '[[],123]') |
      +------------------------------------+
      |                                  0 |
      +------------------------------------+
      1 row in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d 4h 38m
                  1d 4h 38m
                  Remaining:
                  Remaining Estimate - 1d 4h 38m
                  1d 4h 38m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.