Hi,
I am having an issue with the LOAD DATA LOCAL FILE command on the
latest 3.0.9 JDBC Driver. The command works on Windows, but doesn't
seem to work on OSX and Linux. The error that I get on Linux and OSX
is ...
Syntax error or access violation, message from server: "You have an
error in your SQL syntax. Check the manual that corresponds to your
MySQL server version for the right syntax to use near 'FILE
'/home/username/data.txt' INTO TABLE testtable(id, testfield)"
I have written a Java application which takes a SQL command from a
user and then executes it with the driver. The commands that I
execute on the plaforms are ...
Windows:
LOAD DATA LOCAL FILE
'c:\\data.txt'
INTO TABLE testtable(id, testfield)
Linux:
LOAD DATA LOCAL FILE
'/home/username/data.txt'
INTO TABLE testtable(id, testfield)
OSX:
LOAD DATA LOCAL FILE
'/Users/username/data.txt'
INTO TABLE testtable(id, testfield)
I am assuming the issue is probably with the escape sequence on the
file path, but I have tried different combinations with no luck. I
have tried ...
'/home/username/data.txt'
'//home//username//data.txt'
'\home\username\data.txt'
'\\home\\username\\data.txt'
Does anyone know if this is a bug in the JDBC driver?
Any suggestions would be appreciated.
Thanks
John