MXS-2883: Handle AuthSwitchRequest packets

The backend didn't expect AuthSwitchRequest packets in response to the
handshake response packets. This is allowed by the protocol and appears to
happen with at least MySQL 8.0.
This commit is contained in:
Markus Mäkelä
2020-02-10 12:09:05 +02:00
parent ef769573e4
commit c18f9c6bd7
4 changed files with 30 additions and 22 deletions

View File

@ -510,7 +510,7 @@ bool gw_read_backend_handshake(DCB* dcb, GWBUF* buffer);
mxs_auth_state_t gw_send_backend_auth(DCB* dcb);
/** Sends a response for an AuthSwitchRequest to the default auth plugin */
int send_mysql_native_password_response(DCB* dcb);
int send_mysql_native_password_response(DCB* dcb, GWBUF* buffer);
/** Sends an AuthSwitchRequest packet with the default auth plugin to the DCB */
bool send_auth_switch_request_packet(DCB* dcb);