From a6410deba99d5060a8c3fc0d5f267100125dc6ac Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Mon, 27 Jul 2020 13:53:33 +0530 Subject: MDEV-18916: crash in Window_spec::print_partition() with decimals Removed an unnecessary ifndef which was printing the window name for a named window only in the case of debug build. The print() for the window function should behave in the same way on both release and debug builds. --- sql/item_windowfunc.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sql/item_windowfunc.cc') diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc index a3edacd880e..87dddbfb439 100644 --- a/sql/item_windowfunc.cc +++ b/sql/item_windowfunc.cc @@ -443,10 +443,8 @@ void Item_window_func::print(String *str, enum_query_type query_type) { window_func()->print(str, query_type); str->append(" over "); -#ifndef DBUG_OFF - if (!window_spec) // one can call dbug_print_item() anytime in gdb + if (!window_spec) str->append(window_name); else -#endif - window_spec->print(str, query_type); + window_spec->print(str, query_type); } -- cgit v1.2.1