When a LOAD DATA LOCAL INFILE is executed, the readwritesplit module goes into a special mode where it ignores the data stream until an empty packet is received. By ignoring the stream, readwritesplit avoids misinterpreting the data stream as commands.
This functionality is not implemented in the protocol modules due to the fact that previously, they did not need it. With the fixes to the user re-authentication, the protocol modules need to be aware of the commands being executed.
As LOAD DATA LOCAL INFILE responds with a specific response packet (command byte is set to 0xfb), query parsing is not required. This means that the code currently residing in readwritesplit (rwbackend.cc on the develop branch) must be moved to the client protocol module.