diff options
author | unknown <serg@serg.mylan> | 2004-05-11 12:19:37 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-05-11 12:19:37 +0200 |
commit | 76bc67711723bfa0eeda33798c706d9e333bbb30 (patch) | |
tree | a1714a23c4ab0a10dccf1dfc7509b53b00ebb03d /sql/item_func.cc | |
parent | 2b4a56b9f32d794f54b169d90d422d143320cfd7 (diff) | |
download | mariadb-git-76bc67711723bfa0eeda33798c706d9e333bbb30.tar.gz |
bug#3612 - Item_func_div set decimals incorrectly
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 9d1f784fc25..368c14cc8df 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -402,6 +402,7 @@ longlong Item_func_div::val_int() void Item_func_div::fix_length_and_dec() { decimals=max(args[0]->decimals,args[1]->decimals)+2; + set_if_smaller(decimals, NOT_FIXED_DEC); max_length=args[0]->max_length - args[0]->decimals + decimals; uint tmp=float_length(decimals); set_if_smaller(max_length,tmp); |