1
0
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:
Davi Arnaut
2009-09-30 18:38:02 -03:00
parent f7ebdaef80
commit d941a1f304
5 changed files with 98 additions and 1 deletions

View File

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