Forum: Ruby on Rails MySQL support for LOAD DATA LOCAL

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B185ca326df29f2dd6e31961c3d4c468?d=identicon&s=25 Ward Harold (Guest)
on 2006-04-20 07:57
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.
This topic is locked and can not be replied to.