1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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>
This commit is contained in:
mkaruza
2020-10-02 11:39:27 +02:00
committed by Jan Lindström
parent 41a961d85c
commit b79b3ff655

View File

@@ -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;