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

Where expression with NOT function gives incorrect result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.10, 10.1.13, 5.5, 10.1, 10.0
    • Fix Version/s: 10.1.15
    • Component/s: Optimizer
    • Labels:
      None
    • Sprint:
      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

            Assignee:
            bar Alexander Barkov
            Reporter:
            dylan Dylan Su
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: