8 Aug
2016
8 Aug
'16
2:29 p.m.
Hi Sergei, Here's a new patch, returning DBL_MAX in case of inf. Thanks! On 08/08/2016 03:17 PM, Sergei Golubchik wrote:
Hi, Alexander!
On Aug 03, Alexander Barkov wrote:
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index adf48f6..03600b7 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1762,7 +1762,7 @@ double Item_sum_std::val_real() { DBUG_ASSERT(fixed == 1); double nr= Item_sum_variance::val_real(); - DBUG_ASSERT(nr >= 0.0); + DBUG_ASSERT(nr >= 0.0 || my_isinf(nr)); return sqrt(nr); }
is it ok to do sqrt(inf)? what will it be? 0? inf? nan? may be this should return NULL in inf case?
Regards, Sergei Chief Architect MariaDB and security@mariadb.org