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

Workaround for problems with tailcall optimisation and DTrace

This commit is contained in:
Mikael Ronstrom
2009-03-06 12:51:51 +01:00
parent 9cf08c21aa
commit e0cca13038

View File

@@ -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 */