[MDEV-9374] having '2015-01-01 01:00:00.000001' > coalesce(NULL) returns true Created: 2016-01-06  Updated: 2016-06-16  Resolved: 2016-06-16

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Temporary
Affects Version/s: 5.3.13, 5.5, 10.0, 10.1
Fix Version/s: 5.5.49

Type: Bug Priority: Major
Reporter: Dylan Su Assignee: Alexander Barkov
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-9521 Least function returns 0000-00-00 for... Closed
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).



 Comments   
Comment by Elena Stepanova [ 2016-01-11 ]

Thanks for the report and the test case.
Not reproducible on current MySQL 5.5, 5.6, 5.7.

Comment by Alexander Barkov [ 2016-06-16 ]

Duplicate for MDEV-9521

Generated at Thu Feb 08 07:34:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.