@@wsrep_slave_threads
1
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=DEFAULT;
connection node_1;
--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=DEFAULT;
{
uint error;
ha_rows rows;
- 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), (unsigned long) thd->thread_id);
+ break;
+ case ER_OUT_OF_RESOURCES:
+ default:
+ my_error(error, MYF(0));
}
}