MXS-1773: Update internal state when LOAD DATA LOCAL INFILE fails

When a LOAD DATA LOCAL INFILE is actively rejected by the server, the
server sends an error to the client. This error was not detected and the
router was stuck in the special mode that handles LOAD DATA LOCAL INFILE.
This commit is contained in:
Markus Mäkelä 2018-04-10 22:51:16 +03:00
parent e327282e82
commit 1eefb46e68
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -1150,6 +1150,12 @@ static void clientReply(MXS_ROUTER *instance,
SRWBackend& backend = get_backend_from_dcb(rses, backend_dcb);
if (rses->load_data_state == LOAD_DATA_ACTIVE && mxs_mysql_is_err_packet(writebuf))
{
// Server responded with an error to the LOAD DATA LOCAL INFILE
rses->load_data_state = LOAD_DATA_INACTIVE;
}
if (backend->get_reply_state() == REPLY_STATE_DONE)
{
/** If we receive an unexpected response from the server, the internal