mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-454 Addition of a time interval reduces the resulting value
1. Field_newdate::get_date should refuse to return a date with zeros when TIME_NO_ZERO_IN_DATE is set, not when TIME_FUZZY_DATE is unset 2. Item_func_to_days and Item_date_add_interval can only work with valid dates, no zeros allowed.
This commit is contained in:
parent
a44331ab34
commit
3444e8e925
4 changed files with 22 additions and 3 deletions
|
|
@ -5789,7 +5789,7 @@ bool Field_newdate::get_date(MYSQL_TIME *ltime,uint fuzzydate)
|
|||
if (!tmp)
|
||||
return fuzzydate & TIME_NO_ZERO_DATE;
|
||||
if (!ltime->month || !ltime->day)
|
||||
return !(fuzzydate & TIME_FUZZY_DATE);
|
||||
return fuzzydate & TIME_NO_ZERO_IN_DATE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue