From b0154190fbebe428cbcdc28e12ab0af836c55e34 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 17 Mar 2016 21:50:07 +0300 Subject: [PATCH] Remove the wrong check, win_spec->order_list may be empty but it is not NULL. --- sql/sql_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_window.cc b/sql/sql_window.cc index 0420ca33b06..7233828e3cc 100644 --- a/sql/sql_window.cc +++ b/sql/sql_window.cc @@ -135,7 +135,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, if (win_spec->window_frame && win_spec->window_frame->units == Window_frame::UNITS_RANGE) { - if (!win_spec->order_list || win_spec->order_list->elements != 1) + if (win_spec->order_list->elements != 1) { my_error(ER_RANGE_FRAME_NEEDS_SIMPLE_ORDERBY, MYF(0)); DBUG_RETURN(1);