[CONC-420] Double LOAD DATA LOCAL INFILE fails with commit 02e7d56 Created: 2019-06-19  Updated: 2021-02-09

Status: Open
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: 3.0.9, 3.1.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: markus makela Assignee: Georg Richter
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MXS-2568 mxs1828_double_local_infile fails af... Closed

 Description   

The following fails when client multi-statements are enabled and all lines are executed as a single command. The START TRANSACTION fails with a Commands out of sync; you can't run this command now error.

CREATE OR REPLACE TABLE test.t1(id INT);
LOAD DATA LOCAL INFILE './data.csv' INTO TABLE test.t1;LOAD DATA LOCAL INFILE './data.csv' INTO TABLE test.t1; -- Note: this line executed as a single mysql_query
START TRANSACTION; -- this starts to fail with 02e7d5654dd83600f3c1e27b7c61ab1f4ea59138
SELECT COUNT(*) FROM test.t1; -- should return double the rows that data.csv contains
COMMIT;

This works before commit 02e7d5654dd83600f3c1e27b7c61ab1f4ea59138 and fails after it.



 Comments   
Comment by markus makela [ 2019-06-20 ]

Fixed by enabling LOCAL INFILE support explicitly:

mysql_optionsv(mysql, MYSQL_OPT_LOCAL_INFILE, (void *)"1"); /* enable */                  

Comment by Georg Richter [ 2021-02-08 ]

markus makela Can we close this issue?

Comment by markus makela [ 2021-02-09 ]

Yeah, I think it can be closed.

Generated at Thu Feb 08 03:05:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.