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.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index eb6e395c266..2b38584fe23 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1072,6 +1072,8 @@ void Item_func_round::fix_length_and_dec()
decimals=0;
else
decimals=min(tmp,NOT_FIXED_DEC);
+ if ((tmp= decimals - args[0]->decimals) > 0)
+ max_length+= tmp;
}
}