1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-15287 Bad result for LEAST/GREATEST(datetime_alike_string, time)

This commit is contained in:
Alexander Barkov
2018-02-12 17:55:48 +04:00
parent da99e086f9
commit 4087683e1a
6 changed files with 289 additions and 0 deletions

View File

@@ -121,6 +121,15 @@ bool Type_handler_data::init()
Type_handler_data *type_handler_data= NULL;
void Time::make_from_item(Item *item)
{
if (item->get_time(this))
time_type= MYSQL_TIMESTAMP_NONE;
else
valid_MYSQL_TIME_to_valid_value();
}
void Type_std_attributes::set(const Field *field)
{
decimals= field->decimals();
@@ -3902,6 +3911,13 @@ bool Type_handler_temporal_result::
return func->get_date_native(ltime, fuzzydate);
}
bool Type_handler_time_common::
Item_func_min_max_get_date(Item_func_min_max *func,
MYSQL_TIME *ltime, ulonglong fuzzydate) const
{
return func->get_time_native(ltime);
}
/***************************************************************************/
/**