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:
parent
636fdca4aa
commit
81937c635b
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user