diff options
author | mkaruza <mario.karuza@galeracluster.com> | 2020-10-02 11:39:27 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-12-21 11:24:24 +0200 |
commit | b79b3ff65571287882724b7b5cbe21004594a4d9 (patch) | |
tree | 24ea61268cb94968b590b1f959cb2819f513e39a /sql | |
parent | 41a961d85c9a083c816a9f628d97786964d208a5 (diff) | |
download | mariadb-git-b79b3ff65571287882724b7b5cbe21004594a4d9.tar.gz |
MDEV-23468: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed on shutdown
Closing remaining threads in `wsrep_close_client_connections` should also
check `thd_is_connection_alive` for thd before closing connection. Assert is
happening when thread already doing shutdown, but still not removed from threads
list.
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql')
-rw-r--r-- | sql/wsrep_mysqld.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 7732dc0eefe..93ea3bc539f 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -46,6 +46,7 @@ #include <cstdlib> #include <string> #include "log_event.h" +#include "sql_connect.h" #include <sstream> @@ -2441,10 +2442,12 @@ static my_bool kill_remaining_threads(THD *thd, THD *caller_thd) if (is_client_connection(thd) && !abort_replicated(thd) && !is_replaying_connection(thd) && + thd_is_connection_alive(thd) && thd != caller_thd) { + WSREP_INFO("killing local connection: %lld", (longlong) thd->thread_id); - close_connection(thd, 0); + close_connection(thd); } #endif return 0; |