Bug #1525 Load Data not working
Submitted: 10 Oct 2003 12:03 Modified: 10 Oct 2003 13:53
Reporter: A Sung Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.15 OS:Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[10 Oct 2003 12:03] A Sung
Description:
Unless I'm doing something wrong on my part, I don't think the JDBC driver supports neither Load Data Local Infile nor Load Data Infile.

How to repeat:
In MySQL console execute the following SQL command:

LOAD DATA INFILE 'c:\\temp\\upload.csv' INTO TABLE upload1 FIELDS TERMINATED BY ',';

The upload1 table gets populated. Now in Java, run the following code:

String login = database login information;
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con=DriverManager.getConnection(login);
Statement s = con.createStatement();

sql = "LOAD DATA INFILE 'c:\\\\temp\\\\upload.csv' INTO TABLE upload2 FIELDS TERMINATED BY ','";
s.executeUpdate(sql);

Uploade2 is empty.
[10 Oct 2003 13:53] Mark Matthews
You don't state what version of Connector/J you use, however LOAD DATA LOCAL INFILE is in the 3.0.x series, and this feature is actually in the testsuite (so it is known to work, as it's tested before every release).

Can you please let us know what version of connector/J you are using (if you're not using 3.0.9, please upgrade to 3.0.9 and test again...), and create a _repeatable_ testcase?