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:
counterpoint
2016-02-24 10:00:45 +00:00
parent 395cbdc103
commit 5122777829
5 changed files with 50 additions and 45 deletions

View File

@ -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;
}

View File

@ -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);
}