summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-03-16 12:51:22 +1100
committerDaniel Black <daniel@mariadb.org>2022-03-16 12:51:22 +1100
commit6a2d88c132221ea07dd322060089c85ff5e469b5 (patch)
treeaf9a61d61f50b9dd2209cad74552bf434d224cff /sql/sql_parse.cc
parent0e63023cb8f7e52506241723c105d31051a57820 (diff)
parent57dbe8785d14a4b9e5b9dc17625cd00f615e136d (diff)
downloadmariadb-git-6a2d88c132221ea07dd322060089c85ff5e469b5.tar.gz
Merge 10.2 to 10.3
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 4ff1776e244..e849b3980fb 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -9205,15 +9205,17 @@ void sql_kill_user(THD *thd, LEX_USER *user, killed_state state)
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
}
#endif /* WITH_WSREP */
- if (likely(!(error= kill_threads_for_user(thd, user, state, &rows))))
- my_ok(thd, rows);
- else
+ switch (error= kill_threads_for_user(thd, user, state, &rows))
{
- /*
- This is probably ER_OUT_OF_RESOURCES, but in the future we may
- want to write the name of the user we tried to kill
- */
- my_error(error, MYF(0), user->host.str, user->user.str);
+ case 0:
+ my_ok(thd, rows);
+ break;
+ case ER_KILL_DENIED_ERROR:
+ my_error(error, MYF(0), (long long) thd->thread_id);
+ break;
+ case ER_OUT_OF_RESOURCES:
+ default:
+ my_error(error, MYF(0));
}
#ifdef WITH_WSREP
return;