Merge branch '5.5' into 10.0

This commit is contained in:
Sergei Golubchik 2016-08-10 19:19:05 +02:00
commit 309c08c17c
64 changed files with 1244 additions and 273 deletions

View file

@ -1479,7 +1479,7 @@ my_decimal *Item_sum_sum::val_decimal(my_decimal *val)
if (aggr)
aggr->endup();
if (hybrid_type == DECIMAL_RESULT)
return (dec_buffs + curr_dec_buff);
return null_value ? NULL : (dec_buffs + curr_dec_buff);
return val_decimal_from_real(val);
}
@ -1779,6 +1779,8 @@ double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
double nr= Item_sum_variance::val_real();
if (my_isinf(nr))
return DBL_MAX;
DBUG_ASSERT(nr >= 0.0);
return sqrt(nr);
}