Skip to content
Permalink
Browse files
Update the error messages involving percentile functions
  • Loading branch information
varunraiko committed Nov 1, 2017
1 parent 0ef6127 commit 4088791
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
@@ -766,7 +766,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist,
prev_value= arg->val_real();
if (prev_value > 1 || prev_value < 0)
{
my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(0));
my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(0), func_name());
return true;
}
first_call= false;
@@ -776,7 +776,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist,

if (prev_value != arg_val)
{
my_error(ER_ARGUMENT_NOT_CONSTANT, MYF(0));
my_error(ER_ARGUMENT_NOT_CONSTANT, MYF(0), func_name());
return true;
}

@@ -887,15 +887,15 @@ class Item_sum_percentile_cont : public Item_sum_cume_dist,
prev_value= arg->val_real();
if (prev_value > 1 || prev_value < 0)
{
my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(0));
my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(0), func_name());
return true;
}
}

double arg_val= arg->val_real();
if (prev_value != arg_val)
{
my_error(ER_ARGUMENT_NOT_CONSTANT, MYF(0));
my_error(ER_ARGUMENT_NOT_CONSTANT, MYF(0), func_name());
return true;
}

@@ -7791,8 +7791,8 @@ ER_NOT_SINGLE_ELEMENT_ORDER_LIST
ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
eng "Numeric datatype is required for %s function"
ER_ARGUMENT_NOT_CONSTANT
eng "Argument to the percentile functions is not a constant"
eng "Argument to the %s function is not a constant for a partition"
ER_ARGUMENT_OUT_OF_RANGE
eng "Argument to the percentile functions does not belong to the range [0,1]"
eng "Argument to the %s function does not belong to the range [0,1]"
ER_WRONG_TYPE_OF_ARGUMENT
eng "Numeric values are only allowed as arguments to percentile functions"
eng "%s function only accepts arguments that can be converted to numerical types"

0 comments on commit 4088791

Please sign in to comment.