From 38f048a013bcb9c73d74c26af9db4cfdf7299d93 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Tue, 12 Aug 2014 12:43:56 -0400 Subject: [PATCH] bzr merge -r4101..4103 codership/5.6/ --- sql/event_data_objects.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 8f00ace7124..3c5a4a7909b 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1476,11 +1476,12 @@ end: if (WSREP(thd)) { // sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX)); // sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack. - LEX *old_lex= thd->lex, new_lex; - new_lex.sql_command= SQLCOM_DROP_EVENT; - thd->lex= &new_lex; + LEX lex; + LEX* saved = thd->lex; + lex.sql_command = SQLCOM_DROP_EVENT; + thd->lex = &lex; WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL); - thd->lex= old_lex; + thd->lex = saved; } #endif