mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
merge with MySQL 5.1.65
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user