From 85e6bba1d6fb5cb2487c760d9e73812d4fb17f32 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 7 May 2018 17:42:55 +0200 Subject: MDEV-15347: Valgrind or ASAN errors in mysql_make_view on query from information_schema Make each lex pointing to statement lex instead of global pointer in THD (no need store and restoire the global pointer and put it on SP stack). --- sql/sql_prepare.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_prepare.cc') diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 6e14ddc2afb..d39ed6aa637 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3635,7 +3635,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) if (! (lex= new (mem_root) st_lex_local)) DBUG_RETURN(TRUE); - stmt_lex= lex; + lex->stmt_lex= lex; if (set_db(thd->db, thd->db_length)) DBUG_RETURN(TRUE); -- cgit v1.2.1