1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

fix Item_window_func::print() not to crash before fix_fields()

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
This commit is contained in:
Sergei Golubchik
2018-02-05 16:00:39 +01:00
parent c4930a820a
commit 2eb00d1eba

View File

@@ -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);
}