mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Revert MDEV-18464 and MDEV-12009
This reverts commit21b2fada7a
and commit81d71ee6b2
. The MDEV-18464 change introduces a few data race issues. Contrary to the documentation, the field trx_t::victim is not always being protected by lock_sys_t::mutex and trx_t::mutex. Most importantly, it seems that KILL QUERY could wrongly avoid acquiring both mutexes when invoking lock_trx_handle_wait_low(), in case another thread had already set trx->victim=true. We also revert MDEV-12009, because it should depend on the MDEV-18464 fix being present.
This commit is contained in:
@ -8292,19 +8292,11 @@ kill_one_thread(THD *thd, longlong id, killed_state kill_signal, killed_type typ
|
||||
It's ok to also kill DELAYED threads with KILL_CONNECTION instead of
|
||||
KILL_SYSTEM_THREAD; The difference is that KILL_CONNECTION may be
|
||||
faster and do a harder kill than KILL_SYSTEM_THREAD;
|
||||
|
||||
Note that if thread is wsrep Brute Force or applier thread we
|
||||
allow killing it only when we're SUPER.
|
||||
*/
|
||||
|
||||
if ((thd->security_ctx->master_access & SUPER_ACL) ||
|
||||
(thd->security_ctx->user_matches(tmp->security_ctx)
|
||||
#ifdef WITH_WSREP
|
||||
&&
|
||||
!tmp->wsrep_applier &&
|
||||
!wsrep_thd_is_BF(tmp, false)
|
||||
#endif
|
||||
))
|
||||
if (((thd->security_ctx->master_access & SUPER_ACL) ||
|
||||
thd->security_ctx->user_matches(tmp->security_ctx)) &&
|
||||
!wsrep_thd_is_BF(tmp, false))
|
||||
{
|
||||
tmp->awake(kill_signal);
|
||||
error=0;
|
||||
|
Reference in New Issue
Block a user