Remove unused locks and variables

Removed unused spinlocks from DCBs, sessions and the MySQL protocol
structs. They were used in a context where only one thread has access to
the structure.

Removed unused member variables from DCBs.
This commit is contained in:
Markus Mäkelä
2017-02-03 17:26:55 +02:00
parent 517ecd9a12
commit ce5cd69eb3
15 changed files with 36 additions and 217 deletions

View File

@ -1362,7 +1362,6 @@ gw_client_close(DCB *dcb)
if (session != NULL && SESSION_STATE_DUMMY != session->state)
{
CHK_SESSION(session);
spinlock_acquire(&session->ses_lock);
if (session->state != SESSION_STATE_STOPPING)
{
@ -1376,14 +1375,9 @@ gw_client_close(DCB *dcb)
*/
if (session->router_session != NULL)
{
spinlock_release(&session->ses_lock);
/** Close router session and all its connections */
router->closeSession(router_instance, session->router_session);
}
else
{
spinlock_release(&session->ses_lock);
}
}
return 1;
}