[MDEV-3267] LP:993103 - Wrong result with LAST_DAY('0000-00-00 00:00:00') IS NULL in WHERE condition Created: 2012-05-02  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Igor Babaev Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug993103.xml    

 Description   

The following sequence of commands returns incorrect result in MariaDB 5.2:

CREATE TABLE t1(a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;

MariaDB [test]> SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;
Empty set (0.01 sec)

The expected result is:
MariaDB [test]> SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;
------

a

------

1

------

(see also bug #13626019 for mysql)



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2012-05-10 ]

Launchpad bug id: 993103

Generated at Thu Feb 08 06:47:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.