[MDEV-8814] Wrong result for WHERE datetime_column > TIME('00:00:00') Created: 2015-09-18  Updated: 2015-09-18  Resolved: 2015-09-18

Status: Closed
Project: MariaDB Server
Component/s: Temporal Types
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.1.8

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: upstream-not-affected


 Description   

In this script:

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a DATETIME);
INSERT INTO t1 VALUES ('2000-09-12 00:00:00'), ('2007-04-25 05:08:49');
SELECT * FROM t1 WHERE a>TIME'00:00:00';
SELECT * FROM t1 WHERE a>TIME('00:00:00');

the first SELECT query correctly returns empty set, and the second SELECT query erroneously returns two rows:

+---------------------+
| a                   |
+---------------------+
| 2000-09-12 00:00:00 |
| 2007-04-25 05:08:49 |
+--------------------



 Comments   
Comment by Alexander Barkov [ 2015-09-18 ]

Not repeatable in MySQL-5.7.8

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