Commit 9e1075ee authored by Nirbhay Choubey's avatar Nirbhay Choubey

Follow-up patch for lp:1312618 to fix a segfault.

parent c039d966
......@@ -1473,12 +1473,15 @@ end:
thd->tx_read_only= false;
#ifdef WITH_WSREP
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 lex;
lex.sql_command = SQLCOM_DROP_EVENT;
thd->lex = &lex;
LEX *old_lex= thd->lex, new_lex;
new_lex.sql_command= SQLCOM_DROP_EVENT;
thd->lex= &new_lex;
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
thd->lex= old_lex;
}
#endif
ret= Events::drop_event(thd, dbname, name, FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment