MySQL support for LOAD DATA LOCAL


#1

I upgraded my Linux box (RHEL4) from Ruby 1.8.2 and RoR 1.0 (with mysql
gem v2.6) to Ruby 1.8.4 and RoR 1.1.2 (with mysql gem v2.7). Immediately
one of my scripts broke. It was using MySQL’s LOAD DATA LOCAL mechanism
to bulk load a CSV file. While it worked fine in the old version in the
new version when I do:

loadcmd = "load data local infile ‘#{csvfile}’ … "
ActiveRecord::Base.connection.excute(loadcmd)

it complains that MySQL doesn’t support that operation - sorry don’t
have the exact error message at the moment. I’ve logged into MySQL from
the console and successfully executed the loadcmd so I know (a) that
MySQL supports it and (b) that the command works. Anyone have a similar
experience or know what’s going on here?

… WkH

p.s I’m using MySQL 5.0.20.