Commit e0cca130 authored by Mikael Ronstrom's avatar Mikael Ronstrom

Workaround for problems with tailcall optimisation and DTrace

parent 9cf08c21
......@@ -1764,9 +1764,13 @@ void close_connection(THD *thd, uint errcode, bool lock)
net_send_error(thd, errcode, ER(errcode)); /* purecov: inspected */
vio_close(vio); /* vio is freed in delete thd */
}
MYSQL_CONNECTION_DONE((int) errcode, thd->thread_id);
if (lock)
(void) pthread_mutex_unlock(&LOCK_thread_count);
MYSQL_CONNECTION_DONE((int) errcode, thd->thread_id);
if (MYSQL_CONNECTION_DONE_ENABLED())
{
sleep(0); /* Workaround to avoid tailcall optimisation */
}
DBUG_VOID_RETURN;
}
#endif /* EMBEDDED_LIBRARY */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment