diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 87c3bd552cb..42fcae78b1b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2192,6 +2192,7 @@ done: MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da()); thd->m_statement_psi = NULL; thd->m_digest = NULL; + thd->reset_query_for_display(); /* Prevent rewritten query from getting "stuck" in SHOW PROCESSLIST. */ thd->rewritten_query.mem_free();