mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 07:15:33 +02:00
followup for lp:730637
mysql-test/t/func_time.test: fixed wrong test case sql-common/my_time.c: negative datetime is invalid. fix check_date() to reflect that.
This commit is contained in:
parent
30e5b4d719
commit
b27b5793a0
3 changed files with 14 additions and 20 deletions
|
|
@ -84,7 +84,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
|
|||
if (not_zero_date)
|
||||
{
|
||||
if ((((flags & TIME_NO_ZERO_IN_DATE) || !(flags & TIME_FUZZY_DATE)) &&
|
||||
(ltime->month == 0 || ltime->day == 0)) ||
|
||||
(ltime->month == 0 || ltime->day == 0)) || ltime->neg ||
|
||||
(!(flags & TIME_INVALID_DATES) &&
|
||||
ltime->month && ltime->day > days_in_month[ltime->month-1] &&
|
||||
(ltime->month != 2 || calc_days_in_year(ltime->year) != 366 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue