Commit 40887913 authored by Varun Gupta's avatar Varun Gupta

Update the error messages involving percentile functions

parent 0ef6127c
...@@ -766,7 +766,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist, ...@@ -766,7 +766,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist,
prev_value= arg->val_real(); prev_value= arg->val_real();
if (prev_value > 1 || prev_value < 0) 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; return true;
} }
first_call= false; first_call= false;
...@@ -776,7 +776,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist, ...@@ -776,7 +776,7 @@ class Item_sum_percentile_disc : public Item_sum_cume_dist,
if (prev_value != arg_val) 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; return true;
} }
...@@ -887,7 +887,7 @@ class Item_sum_percentile_cont : public Item_sum_cume_dist, ...@@ -887,7 +887,7 @@ class Item_sum_percentile_cont : public Item_sum_cume_dist,
prev_value= arg->val_real(); prev_value= arg->val_real();
if (prev_value > 1 || prev_value < 0) 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; return true;
} }
} }
...@@ -895,7 +895,7 @@ class Item_sum_percentile_cont : public Item_sum_cume_dist, ...@@ -895,7 +895,7 @@ class Item_sum_percentile_cont : public Item_sum_cume_dist,
double arg_val= arg->val_real(); double arg_val= arg->val_real();
if (prev_value != arg_val) 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; return true;
} }
......
...@@ -7791,8 +7791,8 @@ ER_NOT_SINGLE_ELEMENT_ORDER_LIST ...@@ -7791,8 +7791,8 @@ ER_NOT_SINGLE_ELEMENT_ORDER_LIST
ER_WRONG_TYPE_FOR_PERCENTILE_FUNC ER_WRONG_TYPE_FOR_PERCENTILE_FUNC
eng "Numeric datatype is required for %s function" eng "Numeric datatype is required for %s function"
ER_ARGUMENT_NOT_CONSTANT 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 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 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"
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment