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

Where expression with NOT function gives incorrect result

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.10, 10.1.13, 5.5, 10.0, 10.1
    • 10.1.15
    • Optimizer
    • None
    • 10.1.15

    Description

      Output:
      ===

      mysql> create table t1(c1 int);
      Query OK, 0 rows affected (0.01 sec)
       
      mysql> insert into t1 values(1);
      elect *Query OK, 1 row affected (0.00 sec)
       
      mysql> select * from t1 where ( (c1 is not null) >= (not true) ) is not null;
      Empty set (0.00 sec)
       
      mysql> select version();
      +---------------------+
      | version()           |
      +---------------------+
      | 10.1.10-MariaDB-log |
      +---------------------+
      1 row in set (0.00 sec)
      

      Problem:
      ===
      Where condition is expected to be true and rows expected.

      Recreate:
      ===

      drop table t1;
      create table t1(c1 int);
      insert into t1 values(1);
      select * from t1 where ( (c1 is not null) >= (not true) ) is not null;
       
      
      

      Attachments

        Activity

          People

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