summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-22 11:40:39 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-22 11:40:39 +0200
commitcefc30b1663114930439e03dec245604bc904604 (patch)
tree83a4479fe38adb24e478dde743856f04d65fa801 /sql/sql_parse.cc
parent34f2f8ea41726d98e50752ff3453ebde70912c35 (diff)
parent171355077501da7ddd32778ab3ebe77c5f7ce7da (diff)
downloadmariadb-git-cefc30b1663114930439e03dec245604bc904604.tar.gz
merge with MySQL 5.1.65
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 64eb7645d03..e0e6a4a57d6 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2307,6 +2307,11 @@ mysql_execute_command(THD *thd)
}
DBUG_RETURN(0);
}
+ /*
+ Execute deferred events first
+ */
+ if (slave_execute_deferred_events(thd))
+ DBUG_RETURN(-1);
}
else
{
@@ -3083,7 +3088,7 @@ end_with_restore_list:
goto error;
#else
{
- if (check_global_access(thd, SUPER_ACL))
+ if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
goto error;
res = show_binlogs(thd);
break;
@@ -7298,7 +7303,7 @@ uint kill_one_thread(THD *thd, ulong id, bool only_kill_query)
continue;
if (tmp->thread_id == id)
{
- pthread_mutex_lock(&tmp->LOCK_thd_data); // Lock from delete
+ pthread_mutex_lock(&tmp->LOCK_thd_kill); // Lock from delete
break;
}
}
@@ -7326,12 +7331,13 @@ uint kill_one_thread(THD *thd, ulong id, bool only_kill_query)
if ((thd->security_ctx->master_access & SUPER_ACL) ||
thd->security_ctx->user_matches(tmp->security_ctx))
{
+ DEBUG_SYNC(thd, "kill_one_thread_before_kill");
tmp->awake(only_kill_query ? THD::KILL_QUERY : THD::KILL_CONNECTION);
error=0;
}
else
error=ER_KILL_DENIED_ERROR;
- pthread_mutex_unlock(&tmp->LOCK_thd_data);
+ pthread_mutex_unlock(&tmp->LOCK_thd_kill);
}
DBUG_PRINT("exit", ("%d", error));
DBUG_RETURN(error);