Try to fix problem if balancing free client DCB and free session so that auth data is always available and client DCB is not freed until session is ready to be freed. Also fix problem in auth logic.
This commit is contained in:
@ -172,7 +172,7 @@ static int gw_read_backend_event(DCB *dcb)
|
||||
goto return_rc;
|
||||
}
|
||||
|
||||
if (dcb->session == NULL)
|
||||
if (dcb->dcb_is_zombie || dcb->session == NULL)
|
||||
{
|
||||
goto return_rc;
|
||||
}
|
||||
|
@ -537,12 +537,12 @@ int gw_read_client_event(DCB* dcb)
|
||||
auth_val = MYSQL_AUTH_NO_SESSION;
|
||||
}
|
||||
}
|
||||
if (MYSQL_AUTH_SUCCEEDED != auth_val)
|
||||
if (MYSQL_AUTH_SUCCEEDED != auth_val && MYSQL_AUTH_SSL_INCOMPLETE != auth_val)
|
||||
{
|
||||
protocol->protocol_auth_state = MYSQL_AUTH_FAILED;
|
||||
mysql_client_auth_error_handling(dcb, auth_val);
|
||||
/**
|
||||
* Close DCB and which will release MYSQL_session
|
||||
* Close DCB and which will release MYSQL_session
|
||||
*/
|
||||
dcb_close(dcb);
|
||||
}
|
||||
|
Reference in New Issue
Block a user