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:
@ -291,20 +291,15 @@ static void handleError(MXS_ROUTER *instance,
|
||||
{
|
||||
backend_dcb->dcb_errhandle_called = true;
|
||||
}
|
||||
spinlock_acquire(&session->ses_lock);
|
||||
|
||||
sesstate = session->state;
|
||||
client_dcb = session->client_dcb;
|
||||
|
||||
if (sesstate == SESSION_STATE_ROUTER_READY)
|
||||
{
|
||||
CHK_DCB(client_dcb);
|
||||
spinlock_release(&session->ses_lock);
|
||||
client_dcb->func.write(client_dcb, gwbuf_clone(errbuf));
|
||||
}
|
||||
else
|
||||
{
|
||||
spinlock_release(&session->ses_lock);
|
||||
}
|
||||
|
||||
/** false because connection is not available anymore */
|
||||
dcb_close(backend_dcb);
|
||||
|
Reference in New Issue
Block a user