From 947ce922c950323a91a187b53d3315b6e6a582f0 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Mon, 17 Jul 2017 15:06:42 +0530 Subject: Added the error ER_NOT_SINGLE_ELEMENT_ORDER_LIST for th percentile functions, these ensure that for the percentile function we have the order list with exactly one element --- sql/item_windowfunc.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index d5e13054755..c860c5ead68 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -111,18 +111,11 @@ Item_window_func::fix_fields(THD *thd, Item **ref) if (only_single_element_order_list()) { - //TODO (varun): need to change the error, the error should say that we have more than one element in the order list if (window_spec->order_list->elements != 1) { - my_error(ER_NO_ORDER_LIST_IN_WINDOW_SPEC, MYF(0), window_func()->func_name()); + my_error(ER_NOT_SINGLE_ELEMENT_ORDER_LIST, MYF(0), window_func()->func_name()); return true; } - /*switch(window_spec->order_list->firt->item[0]->type()) - { - case INT_TYPE: - default: - break; - }*/ } /* -- cgit v1.2.1