Fix current command tracking during LDLI

When a LOAD DATA LOCAL INFILE was executed, the client and backend
protocols would update the command byte leading to misinterpretations of
the data.
This commit is contained in:
Markus Mäkelä 2018-11-26 11:07:28 +02:00
parent 636fdca4aa
commit 81937c635b
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 2 additions and 2 deletions

View File

@ -425,7 +425,7 @@ static inline void prepare_for_write(DCB* dcb, GWBUF* buffer)
{
uint8_t* data = GWBUF_DATA(buffer);
if (!proto->large_query)
if (!proto->large_query && !session_is_load_active(dcb->session))
{
proto->current_command = (mxs_mysql_cmd_t)MYSQL_GET_COMMAND(data);
}

View File

@ -1094,7 +1094,7 @@ static int gw_read_normal_data(DCB* dcb, GWBUF* read_buffer, int nbytes_read)
*/
MySQLProtocol* proto = (MySQLProtocol*)dcb->protocol;
if (!proto->changing_user)
if (!proto->changing_user && !session_is_load_active(session))
{
proto->current_command = (mxs_mysql_cmd_t)mxs_mysql_get_command(read_buffer);
}