[MXS-1896] LOAD DATA INFILE is mistaken for LOAD DATA LOCAL INFILE Created: 2018-06-02  Updated: 2018-07-18  Resolved: 2018-07-18

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.2.7
Fix Version/s: 2.2.9

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 1
Labels: None


 Description   

The response to a LOAD DATA INFILE is just a normal OK packet whereas the response to a LOAD DATA LOCAL INFILE is a Local Infile Request packet. The parsing done by the query classifier does not distinct between the two which causes problems due to the fact that a LOAD DATA LOCAL INFILE puts the readwritesplit into a special mode.

The solution is to distinct the two types of queries and only go into the special mode when LOAD DATA LOCAL INFILE is performed.



 Comments   
Comment by Wagner Bianchi (Inactive) [ 2018-06-25 ]

Folks,

After moving to 2.2.9, we're still seeing the below added to the logs:

2018-06-22 19:38:17.071 error : (751) [readwritesplit] (log_unexpected_response): Unexpected internal state: received response 0x00 from server 'L1LPECASHDB01' when no response was expected. Command: 0x03 Query: <not available>
2018-06-22 19:38:18.365 error : (34) [readwritesplit] (log_unexpected_response): Unexpected internal state: received response 0x00 from server 'L1LPECASHDB01' when no response was expected. Command: 0x03 Query: <not available>

They have a bunch of LOAD DATA INFILE and cannot move the files from the server side to the client side.

Can you guys have a look at that? Cheers and Thanks!

Comment by Wagner Bianchi (Inactive) [ 2018-06-25 ]

Folks,

After moving to 2.2.9, we're still seeing the below added to the logs:

2018-06-22 19:38:17.071 error : (751) [readwritesplit] (log_unexpected_response): Unexpected internal state: received response 0x00 from server 'L1LPECASHDB01' when no response was expected. Command: 0x03 Query: <not available>
2018-06-22 19:38:18.365 error : (34) [readwritesplit] (log_unexpected_response): Unexpected internal state: received response 0x00 from server 'L1LPECASHDB01' when no response was expected. Command: 0x03 Query: <not available>
They have a bunch of LOAD DATA INFILE and cannot move the files from the server side to the client side.

Can you guys have a look at that? Cheers and Thanks!

Comment by Wagner Bianchi (Inactive) [ 2018-06-25 ]

Just to make sure the JIRA has everything needed to analyze the problem, even being a super simple one, regarding what said the developers, the below is the one giving an error:

LOAD DATA INFILE '/tmp/t1.csv'
INTO TABLE t1
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\"'
LINES TERMINATED BY '\n'
;

Generated at Thu Feb 08 04:10:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.