Bug #758 LOAD DATA LOCAL INFILE - don't work for client files...
Submitted: 30 Jun 2003 6:21 Modified: 12 Jul 2003 15:57
Reporter: Razvan Stroe Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:3.23 OS:Microsoft Windows (windows 98)
Assigned to: CPU Architecture:Any

[30 Jun 2003 6:21] Razvan Stroe
Description:
Hi!

I try to load some data using 
LOAD DATA LOCAL INFILE 
from client station to server.
 
It's working if the file is on the server machine.
It's not working if the file is on the client machine.

my.ini file is:
****************************************
[WinMySQLAdmin]
Server=D:/MYSQL/bin/mysqld-opt.exe
user=curs04
password=asdfghjk
QueryInterval=10

[mysqld]
basedir=D:/MYSQL
#bind-address=10.176.12.94
datadir=D:/MYSQL/data
#language=D:/MYSQL/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
#local-infile=1
****************************************

Thank you
Razvan Stroe

How to repeat:
'I have a database "birpr" and a table "presa" with a field "fld1"(longtext)
'I have an *.asp file
'*********************************************
<%@ Language=VBScript %>
<%
strDSN  = "DRIVER={MySQL};DATABASE=birpr;SERVER=;UID=;PORT=;OPTION=0;STMT=;"
Set cn1 = Server.CreateObject("ADODB.Connection")
Set rsCustomers = Server.CreateObject("ADODB.Recordset")
cn1.Open strDSN

strSQL = "LOAD DATA LOCAL INFILE 'c:\\my.txt' INTO TABLE presa FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n'"
rsCustomers.open  strSQL, cn1
Response.Write "ok"
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
ok
</BODY>
</HTML>
'*********************************************

'the error message is
Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[TCX][MyODBC]File 'c:\my.txt' not found (Errcode: 2) 

/bir_pr/adm1.asp, line 9 
'*********************************************************

Suggested fix:
...?
[30 Jun 2003 8:29] Miguel Solorzano
Sorry the current client library which was linked 
MyODBC wasn't compiled with the load data infile enabled.
Please wait for the next release.
[12 Jul 2003 15:57] Miguel Solorzano
Correction of my last post:

You need to enable on the server side the
local-infile.