Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Item_func has this method:
inline bool get_arg0_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) |
{
|
DBUG_ASSERT(!(fuzzy_date & TIME_TIME_ONLY));
|
Datetime dt(current_thd, args[0], fuzzy_date);
|
return (null_value= dt.copy_to_mysql_time(ltime)); |
}
|
which now handles DATE and DATETIME data types.
After MDEV-16991, it won't be possible to have this method, because DATE and DATETIME will have different rounding behavior.
Under terms of this fact, the following changes will be done:
1. get_arg0_date() will be removed
2. All get_arg0_date() calls will be replaced to instantiation of Date or Datetime (depending on the data type needed) and accessing their members through various methods.
3. To simplify the code in item_timefunc.cc and to reuse some duplicate code, the following methods will be added into Date and/or Datetime:
- daynr()
- to_seconds()
- check_date()
- dayofyear()
- quarter()
- week()
- yearweek()
Attachments
Issue Links
- blocks
-
MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMP
-
- Closed
-