summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-22 16:45:25 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-22 16:45:25 +0200
commitf72a7659976089dc6f727bb31e8a91306199cf57 (patch)
tree0199cd1bf1c16b01b358ab88e5dce5b038349872 /sql/sql_parse.cc
parented06ba3492d55c9e9dde231b55352f854e5e4b50 (diff)
parent1fd8150a5b5e3f56aa3c253225929a07ee9a4026 (diff)
downloadmariadb-git-f72a7659976089dc6f727bb31e8a91306199cf57.tar.gz
5.2 merge.
two tests still fail: main.innodb_icp and main.range_vs_index_merge_innodb call records_in_range() with both range ends being open (which triggers an assert)
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 f135789fb57..5489e96d05c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2205,6 +2205,11 @@ mysql_execute_command(THD *thd)
}
DBUG_RETURN(0);
}
+ /*
+ Execute deferred events first
+ */
+ if (slave_execute_deferred_events(thd))
+ DBUG_RETURN(-1);
}
else
{
@@ -2983,7 +2988,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;
@@ -7266,7 +7271,7 @@ uint kill_one_thread(THD *thd, ulong id, killed_state kill_signal)
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;
}
}
@@ -7297,12 +7302,13 @@ uint kill_one_thread(THD *thd, ulong id, killed_state kill_signal)
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(kill_signal);
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);