summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-06-01 14:30:21 +0400
committerAlexander Barkov <bar@mariadb.com>2020-06-01 14:30:21 +0400
commit33b839b2e767775d2345caf73ff4eecd155f0518 (patch)
tree18a756b58418f26e7a05a8745344c946afa8c6a2 /sql/item_windowfunc.cc
parentf22093ad392b6a7c9906ff97551fc9e1eda8ffa7 (diff)
downloadmariadb-git-33b839b2e767775d2345caf73ff4eecd155f0518.tar.gz
MDEV-20280 PERCENTILE_DISC() rejects temporal and string input
Diffstat (limited to 'sql/item_windowfunc.cc')
-rw-r--r--sql/item_windowfunc.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index f20d20c81d6..acf2ee4fdda 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -187,13 +187,6 @@ bool Item_window_func::check_result_type_of_order_item()
case Item_sum::PERCENTILE_DISC_FUNC:
{
Item *src_item= window_spec->order_list->first->item[0];
- Item_result rtype= src_item->cmp_type();
- // TODO-10.5: Fix MDEV-20280 PERCENTILE_DISC() rejects temporal and string input
- if (rtype != REAL_RESULT && rtype != INT_RESULT && rtype != DECIMAL_RESULT)
- {
- my_error(ER_WRONG_TYPE_FOR_PERCENTILE_FUNC, MYF(0), window_func()->func_name());
- return true;
- }
Item_sum_percentile_disc *func=
static_cast<Item_sum_percentile_disc*>(window_func());
func->set_handler(src_item->type_handler());