MXS-1785: Don't assume empty packet is for LDLI
When a LOAD DATA LOCAL INFILE finishes, the client sends an empty packet. The second case when the client sends an empty packet when the previous packet was exactly 0xffffff bytes long. These two packets were confused which caused the internal state to temporarily flip from inactive to ending and back to inactive. The aforementioned flip-flopping didn't have any practical differences but it was caught by a debug assertion.
This commit is contained in:
@ -168,7 +168,7 @@ route_target_t get_target_type(RWSplitSession *rses, GWBUF *buffer,
|
||||
route_target = get_route_target(rses, *command, *type, buffer->hint);
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (rses->load_data_state == LOAD_DATA_ACTIVE)
|
||||
{
|
||||
/** Empty packet signals end of LOAD DATA LOCAL INFILE, send it to master*/
|
||||
rses->load_data_state = LOAD_DATA_END;
|
||||
|
Reference in New Issue
Block a user