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

having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true

    Details

    • Sprint:
      10.0.26

      Description

      Output:

      mysql> drop table if exists t1;
      Query OK, 0 rows affected (0.00 sec)
       
      mysql> create table t1(c1 datetime(0));
      nsert inQuery OK, 0 rows affected (0.01 sec)
       
      mysql> insert into t1 values(null);
      Query OK, 1 row affected (0.00 sec)
       
      mysql> select * from t1 having '2015-01-01 01:00:00.000001' > coalesce(c1);
      +------+
      | c1   |
      +------+
      | NULL |
      +------+
      1 row in set (0.00 sec)
       
      mysql> select version();
      +-----------------+
      | version()       |
      +-----------------+
      | 10.1.10-MariaDB |
      +-----------------+
      1 row in set (0.00 sec)

      Recreate:

      drop table if exists t1;
      create table t1(c1 datetime(0));
      insert into t1 values(null);
      select * from t1 having '2015-01-01 01:00:00.000001' > coalesce(c1);

      Problem:
      =====
      having '2015-01-01 01:00:00.000001' > coalesce(c1) is expected to return NULL(False).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                dylan Dylan Su
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: