summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@skysql.com>2014-08-22 08:43:57 +0300
committerJan Lindström <jan.lindstrom@skysql.com>2014-08-22 08:43:57 +0300
commit4521a532f8baed5eda77ae70f2c6f397c8db9787 (patch)
tree35fdb10fe2d382a5caafb3b92e25c1c61f3a4578
parent79180d87bb43374bcecb323aca5a811c6f5cec6b (diff)
downloadmariadb-git-4521a532f8baed5eda77ae70f2c6f397c8db9787.tar.gz
Fix merge error.
-rw-r--r--sql/event_data_objects.cc6
-rw-r--r--sql/events.cc2
-rw-r--r--sql/mdl.cc10
-rw-r--r--sql/sql_acl.cc9
4 files changed, 18 insertions, 9 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index 8f00ace7124..96ac599a3b6 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -1473,7 +1473,8 @@ end:
thd->tx_read_only= false;
#ifdef WITH_WSREP
- if (WSREP(thd)) {
+ 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;
@@ -1486,10 +1487,9 @@ end:
ret= Events::drop_event(thd, dbname, name, FALSE);
-#ifdef WITH_WSREP
WSREP_TO_ISOLATION_END;
+
error:
-#endif
thd->tx_read_only= save_tx_read_only;
thd->security_ctx->master_access= saved_master_access;
}
diff --git a/sql/events.cc b/sql/events.cc
index 5a5a8893f5e..725a7613e69 100644
--- a/sql/events.cc
+++ b/sql/events.cc
@@ -1131,7 +1131,7 @@ Events::load_events_from_db(THD *thd)
#ifdef WITH_WSREP
// 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.
- if (et->originator != thd->variables.server_id)
+ if (WSREP(thd) && et->originator != thd->variables.server_id)
{
store_record(table, record[1]);
table->field[ET_FIELD_STATUS]->
diff --git a/sql/mdl.cc b/sql/mdl.cc
index 86e893db14e..07130b4d002 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -1910,21 +1910,19 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
if (ticket->get_ctx() != requestor_ctx &&
ticket->is_incompatible_when_granted(type_arg))
{
- if (IF_WSREP(!WSREP_ON, 0))
- break;
#ifdef WITH_WSREP
if (wsrep_thd_is_BF((void *)(requestor_ctx->get_thd()),false) &&
key.mdl_namespace() == MDL_key::GLOBAL)
{
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()));
can_grant = true;
}
else if (!wsrep_grant_mdl_exception(requestor_ctx, ticket))
{
wsrep_can_grant= FALSE;
- if (wsrep_log_conflicts)
+ if (wsrep_log_conflicts)
{
MDL_lock * lock = ticket->get_lock();
WSREP_INFO(
@@ -1936,11 +1934,13 @@ MDL_lock::can_grant_lock(enum_mdl_type type_arg,
else
can_grant= TRUE;
/* Continue loop */
+#else
+ break;
#endif /* WITH_WSREP */
}
}
if ((ticket == NULL) && IF_WSREP(wsrep_can_grant, 1))
- can_grant= TRUE;
+ can_grant= TRUE; /* Incompatible locks are our own. */
}
}
#ifdef WITH_WSREP
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index b55b89265c4..e67a019d1f7 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2727,6 +2727,15 @@ bool change_password(THD *thd, const char *host, const char *user,
}
end:
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);
DBUG_RETURN(result);