summaryrefslogtreecommitdiff
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
parent0e63023cb8f7e52506241723c105d31051a57820 (diff)
parent57dbe8785d14a4b9e5b9dc17625cd00f615e136d (diff)
downloadmariadb-git-6a2d88c132221ea07dd322060089c85ff5e469b5.tar.gz
Merge 10.2 to 10.3
-rw-r--r--mysql-test/suite/galera/r/galera_kill_applier.result4
-rw-r--r--mysql-test/suite/galera/t/galera_kill_applier.test6
-rw-r--r--sql/share/errmsg-utf8.txt48
-rw-r--r--sql/sql_parse.cc18
4 files changed, 42 insertions, 34 deletions
diff --git a/mysql-test/suite/galera/r/galera_kill_applier.result b/mysql-test/suite/galera/r/galera_kill_applier.result
index 075cbe6f702..0b1a0c12d0d 100644
--- a/mysql-test/suite/galera/r/galera_kill_applier.result
+++ b/mysql-test/suite/galera/r/galera_kill_applier.result
@@ -1,8 +1,12 @@
connection node_2;
SET GLOBAL wsrep_slave_threads=2;
+KILL ID;
Got one of the listed errors
+KILL QUERY ID;
Got one of the listed errors
+KILL ID;
Got one of the listed errors
+KILL QUERY ID;
Got one of the listed errors
SET GLOBAL wsrep_slave_threads=1;
connection node_1;
diff --git a/mysql-test/suite/galera/t/galera_kill_applier.test b/mysql-test/suite/galera/t/galera_kill_applier.test
index 4136bac5dc6..c9ff795bab6 100644
--- a/mysql-test/suite/galera/t/galera_kill_applier.test
+++ b/mysql-test/suite/galera/t/galera_kill_applier.test
@@ -15,21 +15,23 @@ SET GLOBAL wsrep_slave_threads=2;
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1`
---disable_query_log
+--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL $applier_thread
+--replace_result $applier_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $applier_thread
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
+--replace_result $aborter_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL $aborter_thread
+--replace_result $aborter_thread ID
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
---enable_query_log
SET GLOBAL wsrep_slave_threads=1;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 55e6051417c..300ec1eaa46 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -2231,30 +2231,30 @@ ER_NO_SUCH_THREAD
swe "Finns ingen tråd med id %lu"
ukr "Невідомий ідентифікатор гілки: %lu"
ER_KILL_DENIED_ERROR
- cze "Nejste vlastníkem threadu %lu"
- dan "Du er ikke ejer af tråden %lu"
- nla "U bent geen bezitter van thread %lu"
- eng "You are not owner of thread %lu"
- est "Ei ole lõime %lu omanik"
- fre "Vous n'êtes pas propriétaire de la tâche no: %lu"
- ger "Sie sind nicht Eigentümer von Thread %lu"
- greek "Δεν είσθε owner του thread %lu"
- hindi "आप थ्रेड %lu के OWNER नहीं हैं"
- hun "A %lu thread-nek mas a tulajdonosa"
- ita "Utente non proprietario del thread %lu"
- jpn "スレッド %lu のオーナーではありません。"
- kor "쓰레드(Thread) %lu의 소유자가 아닙니다."
- nor "Du er ikke eier av tråden %lu"
- norwegian-ny "Du er ikkje eigar av tråd %lu"
- pol "Nie jeste? wła?cicielem w?tku %lu"
- por "Você não é proprietário da 'thread' %lu"
- rum "Nu sinteti proprietarul threadului %lu"
- rus "Вы не являетесь владельцем потока %lu"
- serbian "Vi niste vlasnik thread-a %lu"
- slo "Nie ste vlastníkom vlákna %lu"
- spa "Tu no eres el propietario del thread%lu"
- swe "Du är inte ägare till tråd %lu"
- ukr "Ви не володар гілки %lu"
+ cze "Nejste vlastníkem threadu %lld"
+ dan "Du er ikke ejer af tråden %lld"
+ nla "U bent geen bezitter van thread %lld"
+ eng "You are not owner of thread %lld"
+ est "Ei ole lõime %lld omanik"
+ fre "Vous n'êtes pas propriétaire de la tâche no: %lld"
+ ger "Sie sind nicht Eigentümer von Thread %lld"
+ greek "Δεν είσθε owner του thread %lld"
+ hindi "आप थ्रेड %lld के OWNER नहीं हैं"
+ hun "A %lld thread-nek mas a tulajdonosa"
+ ita "Utente non proprietario del thread %lld"
+ jpn "スレッド %lld のオーナーではありません。"
+ kor "쓰레드(Thread) %lld의 소유자가 아닙니다."
+ nor "Du er ikke eier av tråden %lld"
+ norwegian-ny "Du er ikkje eigar av tråd %lld"
+ pol "Nie jeste? wła?cicielem w?tku %lld"
+ por "Você não é proprietário da 'thread' %lld"
+ rum "Nu sinteti proprietarul threadului %lld"
+ rus "Вы не являетесь владельцем потока %lld"
+ serbian "Vi niste vlasnik thread-a %lld"
+ slo "Nie ste vlastníkom vlákna %lld"
+ spa "Tu no eres el propietario del thread%lld"
+ swe "Du är inte ägare till tråd %lld"
+ ukr "Ви не володар гілки %lld"
ER_NO_TABLES_USED
cze "Nejsou použity žádné tabulky"
dan "Ingen tabeller i brug"
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;