diff options
author | Alexander Barkov <bar@mariadb.org> | 2016-08-03 15:55:48 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2016-08-03 15:55:48 +0400 |
commit | ecb7ce7844237e2366ab5e8d9963f370cb1042aa (patch) | |
tree | 4b54885daca258b5749310893c7694086681b612 /sql/item_func.cc | |
parent | 35c9c856347fe340f3d564f33e76bb6f9ea05e76 (diff) | |
download | mariadb-git-ecb7ce7844237e2366ab5e8d9963f370cb1042aa.tar.gz |
MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
Backporting MDEV-5781 from 10.0.
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 4b5f96cd3e7..6c80c7d3d86 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2661,6 +2661,9 @@ double my_double_round(double value, longlong dec, bool dec_unsigned, volatile double value_div_tmp= value / tmp; volatile double value_mul_tmp= value * tmp; + if (!dec_negative && my_isinf(tmp)) // "dec" is too large positive number + return value; + if (dec_negative && my_isinf(tmp)) tmp2= 0.0; else if (!dec_negative && my_isinf(value_mul_tmp)) |