summaryrefslogtreecommitdiff
path: root/sql/sql_type.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_type.cc')
-rw-r--r--sql/sql_type.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index 114e4cac367..fae4c1d8301 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -4772,7 +4772,7 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_plus_fix_length_and_dec(Item_func_plus *item) const
{
- item->fix_length_and_dec_temporal();
+ item->fix_length_and_dec_temporal(true);
return false;
}
@@ -4821,7 +4821,7 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_minus_fix_length_and_dec(Item_func_minus *item) const
{
- item->fix_length_and_dec_temporal();
+ item->fix_length_and_dec_temporal(true);
return false;
}
@@ -4870,7 +4870,7 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_mul_fix_length_and_dec(Item_func_mul *item) const
{
- item->fix_length_and_dec_temporal();
+ item->fix_length_and_dec_temporal(true);
return false;
}
@@ -4919,7 +4919,8 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_div_fix_length_and_dec(Item_func_div *item) const
{
- item->fix_length_and_dec_temporal();
+ // Item_func_div::int_op() is not implemented. Disallow DECIMAL->INT downcast.
+ item->fix_length_and_dec_temporal(false);
return false;
}
@@ -4968,7 +4969,7 @@ bool Type_handler_decimal_result::
bool Type_handler_temporal_result::
Item_func_mod_fix_length_and_dec(Item_func_mod *item) const
{
- item->fix_length_and_dec_temporal();
+ item->fix_length_and_dec_temporal(true);
return false;
}