Skip to content

Commit

Permalink
fix Item_window_func::print() not to crash before fix_fields()
Browse files Browse the repository at this point in the history
because dbug_print_item() can be invoked any time in gdb,
also before fix_fields.

this fixes a crash of main.win in debug builds
  • Loading branch information
vuvova committed Feb 6, 2018
1 parent c4930a8 commit 2eb00d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sql/item_windowfunc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,10 @@ 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
str->append(window_name);
else
#endif
window_spec->print(str, query_type);
}

0 comments on commit 2eb00d1

Please sign in to comment.