diff options
| author | Michael Widenius <monty@mariadb.org> | 2014-12-15 13:01:11 +0200 |
|---|---|---|
| committer | Michael Widenius <monty@mariadb.org> | 2014-12-15 13:01:11 +0200 |
| commit | 80ee57a30ac9f4692c57ba3b02ce364cc9fcbfe9 (patch) | |
| tree | 63b425cea44ad8d52d2f354a9974f58f04e06440 /sql/sql_parse.cc | |
| parent | 4a32d9c0580d6362cfcd86c6d8f103748946e580 (diff) | |
| download | mariadb-git-80ee57a30ac9f4692c57ba3b02ce364cc9fcbfe9.tar.gz | |
MDEV-6896 kill user command cause MariaDB crash
mysql-test/r/kill-2.result:
test case for MDEV-6896
mysql-test/t/kill-2-master.opt:
test case for MDEV-6896
mysql-test/t/kill-2.test:
test case for MDEV-6896
sql/sql_parse.cc:
Use host_or_ip instead of host as host may be 0
Diffstat (limited to 'sql/sql_parse.cc')
| -rw-r--r-- | sql/sql_parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 0fe3c5b90ea..c21e7fa3e4b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6745,7 +6745,7 @@ static uint kill_threads_for_user(THD *thd, LEX_USER *user, host.str[0] == '%' means that host name was not given. See sql_yacc.yy */ if (((user->host.str[0] == '%' && !user->host.str[1]) || - !strcmp(tmp->security_ctx->host, user->host.str)) && + !strcmp(tmp->security_ctx->host_or_ip, user->host.str)) && !strcmp(tmp->security_ctx->user, user->user.str)) { if (!(thd->security_ctx->master_access & SUPER_ACL) && |
