Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
5.3.13, 5.5(EOL), 10.0(EOL), 10.1(EOL)
-
None
-
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
- duplicates
-
MDEV-9521 Least function returns 0000-00-00 for null date columns instead of null
- Closed