summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c5ac97f2905..f902191d9cf 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -844,6 +844,7 @@ bool Item_func_hybrid_field_type::get_date_from_decimal_op(MYSQL_TIME *ltime,
my_decimal value, *res;
if (!(res= decimal_op_with_null_check(&value)) ||
decimal_to_datetime_with_warn(res, ltime, fuzzydate,
+ field_table_or_null(),
field_name_or_null()))
return make_zero_mysql_time(ltime, fuzzydate);
return (null_value= 0);
@@ -882,6 +883,7 @@ bool Item_func_hybrid_field_type::get_date_from_int_op(MYSQL_TIME *ltime,
bool neg= !unsigned_flag && value < 0;
if (null_value || int_to_datetime_with_warn(neg, neg ? -value : value,
ltime, fuzzydate,
+ field_table_or_null(),
field_name_or_null()))
return make_zero_mysql_time(ltime, fuzzydate);
return (null_value= 0);
@@ -917,6 +919,7 @@ bool Item_func_hybrid_field_type::get_date_from_real_op(MYSQL_TIME *ltime,
{
double value= real_op();
if (null_value || double_to_datetime_with_warn(value, ltime, fuzzydate,
+ field_table_or_null(),
field_name_or_null()))
return make_zero_mysql_time(ltime, fuzzydate);
return (null_value= 0);