[MDEV-5768] LAST_DAY() is inconsistent regarding warnings Created: 2014-02-28  Updated: 2022-09-08

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.36, 10.0.8
Fix Version/s: 5.5

Type: Bug Priority: Minor
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

drop table if exists t1;
create table t1 (a int);
insert into t1 values (0);
select last_day(a), last_day(0) from t1;
+-------------+-------------+
| last_day(a) | last_day(0) |
+-------------+-------------+
| NULL        | NULL        |
+-------------+-------------+
1 row in set, 1 warning (0.00 sec)
 
show warnings;
+---------+------+-------------------------------+
| Level   | Code | Message                       |
+---------+------+-------------------------------+
| Warning | 1292 | Incorrect datetime value: '0' |
+---------+------+-------------------------------+

There is only one warning.
Two warnings are expected.


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