MXS-1203: Fix response tracking of LOAD DATA LOCAL INFILE

When responses are being tracked, the execution of a LOAD DATA LOCAL
INFILE requires special handling. The readwritesplit now has a simple
state machine for the handling of the LOAD DATA LOCAL INFILE command. This
should also make the code a bit more readable.
This commit is contained in:
Markus Mäkelä
2017-04-03 16:12:04 +03:00
parent ea38d511e3
commit 673631084a
4 changed files with 46 additions and 15 deletions

View File

@ -160,7 +160,7 @@ is_packet_a_one_way_message(int packet_type)
void
log_transaction_status(ROUTER_CLIENT_SES *rses, GWBUF *querybuf, qc_query_type_t qtype)
{
if (!rses->rses_load_active)
if (rses->load_data_state == LOAD_DATA_INACTIVE)
{
unsigned char command = MYSQL_GET_COMMAND(GWBUF_DATA(querybuf));
char *qtypestr = qc_typemask_to_string(qtype);