Bug #96503 last_day does not return null with invalid argument "2011-01-00"
Submitted: 12 Aug 2019 3:31 Modified: 12 Aug 2019 5:16
Reporter: Cy Liu Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:8.0.17, 5.6.45, 5.7.27 OS:Any
Assigned to: CPU Architecture:Any

[12 Aug 2019 3:31] Cy Liu
Description:
last_day() supposes to accept a date and returns the last date of the month. But now it accept a invalid date like '2011-01-00'

How to repeat:
mysql> select last_day("2011-01-00");
+------------------------+
| last_day("2011-01-00") |
+------------------------+
| 2011-01-31             |
+------------------------+
1 row in set (0.00 sec)
[12 Aug 2019 5:16] MySQL Verification Team
Hello Cy Liu!

Thank you for the report.

regards,
Umesh