diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-09-28 19:12:05 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-09-28 19:12:05 +0400 |
commit | a4e5902039db10e5661c8475790aff84e67dff09 (patch) | |
tree | 2063a20346d230ec526aa17dd07b33cb010f0ff4 /sql/item_func.cc | |
parent | c5922c5701e68bf6d1d2efa974bb21b1af53fa47 (diff) | |
download | mariadb-git-a4e5902039db10e5661c8475790aff84e67dff09.tar.gz |
MDEV-8862 Wrong field type for MAX(COALESCE(datetime_column))
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 7876929a427..ea1710ecc24 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1089,7 +1089,9 @@ bool Item_func_hybrid_result_type::get_date(MYSQL_TIME *ltime, case STRING_RESULT: { if (is_temporal_type(field_type())) - return date_op(ltime, fuzzydate); + return date_op(ltime, + fuzzydate | + (field_type() == MYSQL_TYPE_TIME ? TIME_TIME_ONLY : 0)); char buff[40]; String tmp(buff,sizeof(buff), &my_charset_bin),*res; if (!(res= str_op(&tmp)) || |