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

Null MEMBER OF (json) depends on type

    XMLWordPrintable

Details

    • Can result in hang or crash

    Description

      CREATE TABLE t1 (j JSON, c VARCHAR(10), i INT);
      INSERT INTO t1 VALUES (NULL,NULL,NULL);
      SELECT j MEMBER OF ('[1]'), c MEMBER OF ('[1]'), i MEMBER OF ('[1]') FROM t1;
      SELECT j MEMBER OF ('[null]'), c MEMBER OF ('[null]'), i MEMBER OF ('[null]') FROM t1;
      DROP TABLE t1;
      
      

      Server version: 13.1.0-MariaDB-asan-debug-log source revision: 7dbc4bef9e3d3dda83e39065f570d97cb8cca66f

      SELECT j MEMBER OF ('[1]'), c MEMBER OF ('[1]'), i MEMBER OF ('[1]') FROM t1;
      j MEMBER OF ('[1]')	c MEMBER OF ('[1]')	i MEMBER OF ('[1]')
      NULL	0	0
      SELECT j MEMBER OF ('[null]'), c MEMBER OF ('[null]'), i MEMBER OF ('[null]') FROM t1;
      j MEMBER OF ('[null]')	c MEMBER OF ('[null]')	i MEMBER OF ('[null]')
      NULL	1	1
      

      JarirBob FYI

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              alice Alice Sherepa
              Rucha Deodhar Rucha Deodhar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 0d
                  0d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25d
                  0.25d

                  Git Integration

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