mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#47525: MySQL crashed (Federated)
On Mac OS X or Windows, sending a SIGHUP to the server or a asynchronous flush (triggered by flush_time), would cause the server to crash. The problem was that a hook used to detach client API handles wasn't prepared to handle cases where the thread does not have a associated session. The solution is to verify whether the thread has a associated session before trying to detach a handle.
This commit is contained in:
@ -4756,7 +4756,7 @@ extern "C" void slave_io_thread_detach_vio()
|
||||
{
|
||||
#ifdef SIGNAL_WITH_VIO_CLOSE
|
||||
THD *thd= current_thd;
|
||||
if (thd->slave_thread)
|
||||
if (thd && thd->slave_thread)
|
||||
thd->clear_active_vio();
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user