Handle AuthSwitchRequest responses to COM_CHANGE_USER
The COM_CHANGE_USER that is sent as a part of the reset process for a persistent connection did not expect a AuthSwitchRequest packet to be sent as that implies that the server did not take the authentication fast path. In this case, an error message needs to be logged stating that the server requested a different authentication plugin than was expected.
This commit is contained in:
@ -774,6 +774,12 @@ gw_read_and_write(DCB *dcb)
|
||||
* close the DCB and send an error to the client. */
|
||||
log_error_response(dcb, reply);
|
||||
}
|
||||
else if (result == MYSQL_REPLY_AUTHSWITCHREQUEST &&
|
||||
gwbuf_length(reply) > MYSQL_EOF_PACKET_LEN)
|
||||
{
|
||||
MXS_ERROR("Received AuthSwitchRequest to '%s' when '%s' was expected",
|
||||
(char*)GWBUF_DATA(reply) + 5, DEFAULT_MYSQL_AUTH_PLUGIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
/** This should never happen */
|
||||
|
Reference in New Issue
Block a user