mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug #23653: Crash if last_day('0000-00-00')
As get_arg0_date() in the Item_func_last_day::get_date() returns 0000-00-00 date sometimes, we have to check ltime->month for 0 after the call. mysql-test/r/func_time.result: Fix for bug #23653: Crash if last_day('0000-00-00') - test result. mysql-test/t/func_time.test: Fix for bug #23653: Crash if last_day('0000-00-00') - test case. sql/item_timefunc.cc: Fix for bug #23653: Crash if last_day('0000-00-00') - return error if month is 0.
This commit is contained in:
@ -815,4 +815,7 @@ union
|
||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
|
||||
H
|
||||
5
|
||||
select last_day('0000-00-00');
|
||||
last_day('0000-00-00')
|
||||
NULL
|
||||
End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user