diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index aeabeae25a0..2ae394b6b9a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -10356,7 +10356,7 @@ bool parse_sql(THD *thd, Parser_state *parser_state, Mark it as freed so that stale accesses are caught early. It is brought back by LEX::start() -> LEX_Parser_state::reset_parser_state(). */ - TRASH_FREE((void*) static_cast(thd->lex), + TRASH_FREE((void*) &static_cast(*thd->lex), sizeof(LEX_Parser_state)); /* Restore creation context. */