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

Incorrect result for expression with the <=> operator and IS NULL

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.5
    • None
    • None
    • Ubuntu 19.04

    Description

      Hi everyone,

      On the latest trunk version (0308de9), I could observe a bug, as demonstrated by the following test case:

      CREATE TABLE t0(c0 INT);
      INSERT INTO t0 VALUES (1);
      SELECT (c0 > (NULL <=> 0)) IS NULL FROM t0; -- expected: 0, actual: 1
      

      The expression seems to work correctly when it is used in a WHERE condition:

      SELECT * FROM t0 WHERE (c0 > (NULL <=> 0)) IS NULL; -- no row is fetched
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              mrigger Manuel Rigger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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