1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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:
Sergei Golubchik
2014-07-23 19:36:15 +02:00
parent 80708da138
commit 4e6e720160
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,4 @@
include/master-slave.inc
[connection master]
kill user test2@nohost;
include/rpl_end.inc

View 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

View File

@ -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.