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

IN operator with ( num, NULL ) gives inconsistent result

Details

    • 5.5.48-0, 10.1.13

    Description

      Output:

      mysql> select (1,null) not in ((2,2),(3,3)), (1,null) not in ((2,2)), (1,null) not in ((3,3));
      +-------------------------------+-------------------------+-------------------------+
      | (1,null) not in ((2,2),(3,3)) | (1,null) not in ((2,2)) | (1,null) not in ((3,3)) |
      +-------------------------------+-------------------------+-------------------------+
      |                          NULL |                       1 |                       1 |
      +-------------------------------+-------------------------+-------------------------+
      1 row in set (0.00 sec)
       
      mysql> select version();
      +-----------------+
      | version()       |
      +-----------------+
      | 10.1.10-MariaDB |
      +-----------------+
      1 row in set (0.00 sec)

      Recreate:

      select (1,null) not in ((2,2),(3,3)), (1,null) not in ((2,2)), (1,null) not in ((3,3));

      Problem:
      ========
      (1,null) not in ((2,2),(3,3)) is expected to return true.

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Elena Stepanova made transition -
          Open Confirmed
          4d 20h 43m 1
          Alexander Barkov made transition -
          Confirmed In Progress
          29d 9h 16m 1
          Alexander Barkov made transition -
          In Progress In Review
          14s 1
          Sergei Golubchik made transition -
          In Review Stalled
          36d 7h 27m 1
          Alexander Barkov made transition -
          Stalled Closed
          4d 13h 31m 1

          People

            bar Alexander Barkov
            dylan Dylan Su
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.