Commit 4e6e7201 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 80708da1
include/master-slave.inc
[connection master]
kill user test2@nohost;
include/rpl_end.inc
#
# 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);
while ((tmp=it++))
{
if (tmp->command == COM_DAEMON)
if (!tmp->security_ctx->user)
continue;
/*
Check that hostname (if given) and user name matches.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment