diff options
author | unknown <ramil@mysql.com> | 2005-04-19 14:44:54 +0500 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-04-19 14:44:54 +0500 |
commit | a437b82affd3323bd02dc60ae0b4565825f1418d (patch) | |
tree | 1708cb3ac5cc59a4148c748e864034fdf58aee3c /sql/item_func.cc | |
parent | 24dd3ea806742038fd41d8f7481a35e248b95bf5 (diff) | |
download | mariadb-git-a437b82affd3323bd02dc60ae0b4565825f1418d.tar.gz |
A fix (bug #9837: round(1, 6) delivers wrong value in create table context).
sql/item_func.cc:
A fix (bug #9837: round(1, 6) delivers wrong value in create table context).
As we change decimals, we should change max_length accordingly.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 2 |
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; } } |