summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-05-14 08:44:34 +0400
committerAlexander Barkov <bar@mariadb.com>2020-05-14 08:44:34 +0400
commitf827ba3b842d4bd18be37d4b983665b5840251bf (patch)
treebc979d3cb8500387b784f66950ed431156d26c17 /sql/item_func.cc
parentedbf124515b36dc2a5ba40ca469d0d70507734a3 (diff)
parent910c31928ee62646f06e1584e43071df34738afb (diff)
downloadmariadb-git-f827ba3b842d4bd18be37d4b983665b5840251bf.tar.gz
Merge remote-tracking branch 'origin/10.1' into 10.2
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 a2409de08ca..38dc0667e0b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2326,6 +2326,9 @@ bool Item_func_int_val::fix_length_and_dec()
if ((args[0]->max_length - args[0]->decimals) >=
(DECIMAL_LONGLONG_DIGITS - 2))
{
+ fix_char_length(
+ my_decimal_precision_to_length_no_truncation(
+ args[0]->decimal_int_part(), 0, false));
set_handler_by_result_type(DECIMAL_RESULT);
}
else