Bug #14422 | LOAD DATA LOCAL INFILE errcode 13 | ||
---|---|---|---|
Submitted: | 28 Oct 2005 11:10 | Modified: | 31 Oct 2005 8:48 |
Reporter: | Jordi Garcia | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / ODBC | Severity: | S1 (Critical) |
Version: | 3.51.12 | OS: | Windows (Windows XP SP2) |
Assigned to: | CPU Architecture: | Any |
[28 Oct 2005 11:10]
Jordi Garcia
[28 Oct 2005 11:11]
Jordi Garcia
Sample text file
Attachment: P.txt (text/plain), 152.81 KiB.
[30 Oct 2005 9:27]
Vasily Kishkin
Sorry...I was not able to reproduce the bug. Could you please create and attach your test case ? Or you can build and run my test case. My test case is attached.
[30 Oct 2005 9:28]
Vasily Kishkin
Test case
Attachment: test.c (text/plain), 4.16 KiB.
[30 Oct 2005 11:34]
Jordi Garcia
I use Delphi 7 to do the testing. Create a new ODBC Data Source Name called "Test_DSN" (check that it works properly) and run the attached application.
[30 Oct 2005 11:36]
Jordi Garcia
Create a new ODBC DSN like this and check that it works
Attachment: Create a new ODBC DSN.gif (image/gif, text), 14.88 KiB.
[30 Oct 2005 11:59]
Jordi Garcia
Test application compiled and sources (Delphi 7) Part 1
Attachment: Test.part1.rar (application/octet-stream, text), 190.00 KiB.
[30 Oct 2005 12:00]
Jordi Garcia
Test application compiled and sources (Delphi 7) Part 2
Attachment: Test.part2.rar (application/octet-stream, text), 61.46 KiB.
[31 Oct 2005 8:48]
Vasily Kishkin
I've got the follow message: "File loaded OK" and "Tested OK". There are not problems. I guess There can be a problem with permition of mysql service. But It is not MyODBC bug.
[31 Oct 2005 8:53]
Jordi Garcia
Ok, I will reinstall everything from scratch and try again. Thank you for your time and sorry for any inconvenience.
[1 Nov 2005 12:23]
Jordi Garcia
After reinstalling everything (twice!) the same error still occurs. This time I typed a script in MySQL Query Browser like this: DROP TABLE IF EXISTS Imported; CREATE TEMPORARY TABLE Imported ( Line mediumint unsigned NOT NULL default 0, TokenOrder tinyint unsigned NOT NULL default 0, TokenId int unsigned NOT NULL default 0 ) ENGINE = MEMORY; LOAD DATA LOCAL INFILE "C:/P.txt" INTO TABLE Imported LINES TERMINATED BY "\r\n"; SELECT * FROM Imported; ...and MySQL Query Browser said: File 'P.txt' not found (Errcode: 13) Then I just removed the word LOCAL from the script and I ran correctly! Conclusion: - I don't think that there's something wrong in my instalation of the MySQL set. - I don't think that there's something wrong with the ODBC driver. - I works OK if using MySQL directly from command line. - There should be something wrong with the connection to the server if LOCAL or so. - I still can't tell why but LOAD DATA works only if the word LOCAL is not specified...
[2 Feb 2010 19:44]
Steph March
Hi, I got the same problem. I found the solution. make sure rights are : for directory where your data is residing drwxr-xr-x. and the data file : -rwxr--r-- and in a X session, gnome or kde, Use konkeror or something to verify rights. It works for me...