Browse Source

Update the error messages involving percentile functions

pull/483/head
Varun Gupta 8 years ago
parent
commit
40887913ff
  1. 8
      sql/item_windowfunc.h
  2. 6
      sql/share/errmsg-utf8.txt

8
sql/item_windowfunc.h

@ -766,7 +766,7 @@ public:
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 @@ public:
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,7 +887,7 @@ public:
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;
}
}
@ -895,7 +895,7 @@ public:
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;
}

6
sql/share/errmsg-utf8.txt

@ -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"
Loading…
Cancel
Save