mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-6290 Crash in KILL HARD QUERY USER x@y when slave threads are running
KILL USER should ignore system threads where sctx->user=sctx->host=NULL
This commit is contained in:
4
mysql-test/suite/rpl/r/kill_hard-6290.result
Normal file
4
mysql-test/suite/rpl/r/kill_hard-6290.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
include/master-slave.inc
|
||||||
|
[connection master]
|
||||||
|
kill user test2@nohost;
|
||||||
|
include/rpl_end.inc
|
11
mysql-test/suite/rpl/t/kill_hard-6290.test
Normal file
11
mysql-test/suite/rpl/t/kill_hard-6290.test
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# MDEV-6290 Crash in KILL HARD QUERY USER x@y when slave threads are running
|
||||||
|
#
|
||||||
|
|
||||||
|
# this test doesn't depend on the binlog format, no need to run it three times
|
||||||
|
--source include/have_binlog_format_mixed.inc
|
||||||
|
|
||||||
|
--source include/master-slave.inc
|
||||||
|
--connection server_2
|
||||||
|
kill user test2@nohost;
|
||||||
|
--source include/rpl_end.inc
|
@ -7365,7 +7365,7 @@ static uint kill_threads_for_user(THD *thd, LEX_USER *user,
|
|||||||
I_List_iterator<THD> it(threads);
|
I_List_iterator<THD> it(threads);
|
||||||
while ((tmp=it++))
|
while ((tmp=it++))
|
||||||
{
|
{
|
||||||
if (tmp->command == COM_DAEMON)
|
if (!tmp->security_ctx->user)
|
||||||
continue;
|
continue;
|
||||||
/*
|
/*
|
||||||
Check that hostname (if given) and user name matches.
|
Check that hostname (if given) and user name matches.
|
||||||
|
Reference in New Issue
Block a user