Skip to content

Commit

Permalink
MDEV-17479 Assertion `mysql_socket.fd != -1' failed in inline_mysql_s…
Browse files Browse the repository at this point in the history
…ocket_send on server shutdown

Do not try to write ER_SHUTDOWN error message to socket, when it is forcefully closed by the shutdown.
This will avoid the race condition (attempt to write to closed socket,  if connection shuts down by itself).
  • Loading branch information
vaintroub committed Jan 31, 2019
1 parent b8aef87 commit 20e19f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ static void close_connections(void)
*/
THD* save_thd= current_thd;
set_current_thd(tmp);
close_connection(tmp,ER_SERVER_SHUTDOWN);
close_connection(tmp);
set_current_thd(save_thd);
}
#endif
Expand Down

0 comments on commit 20e19f6

Please sign in to comment.