diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 473b23fd20c86..f8039b7df0978 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6522,9 +6522,11 @@ static bool execute_show_status(THD *thd, TABLE_LIST *all_tables) memcpy(&thd->status_var, &old_status_var, offsetof(STATUS_VAR, last_cleared_system_status_var)); mysql_mutex_unlock(&LOCK_status); + thd->initial_status_var= NULL; return res; #ifdef WITH_WSREP wsrep_error_label: /* see WSREP_SYNC_WAIT() macro above */ + thd->initial_status_var= NULL; return true; #endif /* WITH_WSREP */ }