diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_timefunc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 5288d4133e7..772bb5ac9ab 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2558,7 +2558,8 @@ void Item_func_add_time::fix_length_and_dec() arg0_field_type= args[0]->field_type(); if (arg0_field_type == MYSQL_TYPE_DATE || arg0_field_type == MYSQL_TYPE_DATETIME || - arg0_field_type == MYSQL_TYPE_TIMESTAMP) + arg0_field_type == MYSQL_TYPE_TIMESTAMP || + is_date) { cached_field_type= MYSQL_TYPE_DATETIME; decimals= max(args[0]->temporal_precision(MYSQL_TYPE_DATETIME), |