[MDEV-3942] FROM_DAYS(<timestamp column>) returns different result in MariaDB comparing to MySQL: NULL vs 0000-00-00 Created: 2012-12-16  Updated: 2013-01-09  Resolved: 2013-01-09

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.0, 5.5.28a, 5.3.11
Fix Version/s: 10.0.2, 5.5.29, 5.3.12

Type: Bug Priority: Trivial
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-3990 engines/* and storage_engine tests an... Closed

 Description   

It's rather a cosmetic difference, but I want to fix our failures on MySQL engines suite (again), and this is one of them. So, if it's intended behavior, please reassign the bug back to me so I update the result file for engines/funcs/r/date_function.

MariaDB 5.3, 5.5, 10.0:

CREATE TABLE t1(c1 TIMESTAMP NOT NULL) ENGINE=MyISAM;
INSERT INTO t1 VALUES('2008-02-29');
SELECT FROM_DAYS(c1) FROM t1;
# FROM_DAYS(c1)
# NULL

MySQL 5.1, 5.5, 5.6, MariaDB 5.2:

CREATE TABLE t1(c1 TIMESTAMP NOT NULL) ENGINE=MyISAM;
INSERT INTO t1 VALUES('2008-02-29');
SELECT FROM_DAYS(c1) FROM t1;
# FROM_DAYS(c1)
# 0000-00-00

No warnings on either version.


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