Commit 991649e3 authored by Alexander Barkov's avatar Alexander Barkov

A cleanup for MDEV-15287: removung unused code

The patch for MDEV-15287 made the code in Item_func_min_max::get_date_native()
dead, as the TIME data type is now handled in get_time_native().
Removing the TIME related code from get_date_native().
parent 54db0be3
......@@ -2704,7 +2704,7 @@ bool Item_func_min_max::get_date_native(MYSQL_TIME *ltime, ulonglong fuzzy_date)
for (uint i=0; i < arg_count ; i++)
{
longlong res= args[i]->val_temporal_packed(Item_func_min_max::field_type());
longlong res= args[i]->val_datetime_packed();
/* Check if we need to stop (because of error or KILL) and stop the loop */
if (args[i]->null_value)
......@@ -2720,15 +2720,6 @@ bool Item_func_min_max::get_date_native(MYSQL_TIME *ltime, ulonglong fuzzy_date)
ltime->time_type= MYSQL_TIMESTAMP_DATE;
ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0;
}
else if (Item_func_min_max::field_type() == MYSQL_TYPE_TIME)
{
ltime->time_type= MYSQL_TIMESTAMP_TIME;
ltime->hour+= (ltime->month * 32 + ltime->day) * 24;
ltime->year= ltime->month= ltime->day= 0;
if (adjust_time_range_with_warn(ltime,
MY_MIN(decimals, TIME_SECOND_PART_DIGITS)))
return (null_value= true);
}
if (!(fuzzy_date & TIME_TIME_ONLY) &&
((null_value= check_date_with_warn(ltime, fuzzy_date,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment