Commit 4521a532 authored by Jan Lindström's avatar Jan Lindström

Fix merge error.

parent 79180d87
...@@ -1473,7 +1473,8 @@ end: ...@@ -1473,7 +1473,8 @@ end:
thd->tx_read_only= false; thd->tx_read_only= false;
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (WSREP(thd)) { if (WSREP(thd))
{
// sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX)); // sql_print_information("sizeof(LEX) = %d", sizeof(struct LEX));
// sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack. // sizeof(LEX) = 4512, so it's relatively safe to allocate it on stack.
LEX *old_lex= thd->lex, new_lex; LEX *old_lex= thd->lex, new_lex;
...@@ -1486,10 +1487,9 @@ end: ...@@ -1486,10 +1487,9 @@ end:
ret= Events::drop_event(thd, dbname, name, FALSE); ret= Events::drop_event(thd, dbname, name, FALSE);
#ifdef WITH_WSREP
WSREP_TO_ISOLATION_END; WSREP_TO_ISOLATION_END;
error: error:
#endif
thd->tx_read_only= save_tx_read_only; thd->tx_read_only= save_tx_read_only;
thd->security_ctx->master_access= saved_master_access; thd->security_ctx->master_access= saved_master_access;
} }
......
...@@ -1131,7 +1131,7 @@ Events::load_events_from_db(THD *thd) ...@@ -1131,7 +1131,7 @@ Events::load_events_from_db(THD *thd)
#ifdef WITH_WSREP #ifdef WITH_WSREP
// when SST from master node who initials event, the event status is ENABLED // when SST from master node who initials event, the event status is ENABLED
// this is problematic because there are two nodes with same events and both enabled. // this is problematic because there are two nodes with same events and both enabled.
if (et->originator != thd->variables.server_id) if (WSREP(thd) && et->originator != thd->variables.server_id)
{ {
store_record(table, record[1]); store_record(table, record[1]);
table->field[ET_FIELD_STATUS]-> table->field[ET_FIELD_STATUS]->
......
...@@ -1910,21 +1910,19 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, ...@@ -1910,21 +1910,19 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
if (ticket->get_ctx() != requestor_ctx && if (ticket->get_ctx() != requestor_ctx &&
ticket->is_incompatible_when_granted(type_arg)) ticket->is_incompatible_when_granted(type_arg))
{ {
if (IF_WSREP(!WSREP_ON, 0))
break;
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()),false) && if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()),false) &&
key.mdl_namespace() == MDL_key::GLOBAL) key.mdl_namespace() == MDL_key::GLOBAL)
{ {
WSREP_DEBUG("global lock granted for BF: %lu %s", WSREP_DEBUG("global lock granted for BF: %lu %s",
wsrep_thd_thread_id(requestor_ctx->get_thd()), wsrep_thd_thread_id(requestor_ctx->get_thd()),
wsrep_thd_query(requestor_ctx->get_thd())); wsrep_thd_query(requestor_ctx->get_thd()));
can_grant = true; can_grant = true;
} }
else if (!wsrep_grant_mdl_exception(requestor_ctx, ticket)) else if (!wsrep_grant_mdl_exception(requestor_ctx, ticket))
{ {
wsrep_can_grant= FALSE; wsrep_can_grant= FALSE;
if (wsrep_log_conflicts) if (wsrep_log_conflicts)
{ {
MDL_lock * lock = ticket->get_lock(); MDL_lock * lock = ticket->get_lock();
WSREP_INFO( WSREP_INFO(
...@@ -1936,11 +1934,13 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg, ...@@ -1936,11 +1934,13 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
else else
can_grant= TRUE; can_grant= TRUE;
/* Continue loop */ /* Continue loop */
#else
break;
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
} }
} }
if ((ticket == NULL) && IF_WSREP(wsrep_can_grant, 1)) if ((ticket == NULL) && IF_WSREP(wsrep_can_grant, 1))
can_grant= TRUE; can_grant= TRUE; /* Incompatible locks are our own. */
} }
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
......
...@@ -2727,6 +2727,15 @@ bool change_password(THD *thd, const char *host, const char *user, ...@@ -2727,6 +2727,15 @@ bool change_password(THD *thd, const char *host, const char *user,
} }
end: end:
close_mysql_tables(thd); close_mysql_tables(thd);
#ifdef WITH_WSREP
if (WSREP(thd) && !thd->wsrep_applier)
{
WSREP_TO_ISOLATION_END;
thd->query_string = query_save;
thd->wsrep_exec_mode = LOCAL_STATE;
}
#endif /* WITH_WSREP */
thd->restore_stmt_binlog_format(save_binlog_format); thd->restore_stmt_binlog_format(save_binlog_format);
DBUG_RETURN(result); DBUG_RETURN(result);
......
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