[MDEV-2688] LP:737474 - Wrong result with DAY(COALESCE(NULL)) in 5.1-micro Created: 2011-03-18  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: Major
Reporter: Philip Stoev (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug737474.xml    

 Description   

Not repeatable in mysql-5.1

DAY(NULL) is NULL and COALESCE(NULL) is NULL, so DAY(COALESCE(NULL)) should also be NULL. However, 5.1-micro returns 0 instead.

MySQL [test]> select DAY(COALESCE(NULL));
---------------------

DAY(COALESCE(NULL))

---------------------

0

---------------------
1 row in set (0.00 sec)



 Comments   
Comment by Rasmus Johansson (Inactive) [ 2011-10-28 ]

Launchpad bug id: 737474

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