I think I have made some progress. I added one line to mysql_adapter.rb in the adapter extensions plugin:
Index: ../../lib/adapter_extensions/connection_adapters/mysql_adapter.rb =================================================================== --- ../../lib/adapter_extensions/connection_adapters/mysql_adapter.rb (revision 906) +++ ../../lib/adapter_extensions/connection_adapters/mysql_adapter.rb (working copy) @@ -43,6 +43,9 @@ end q << " IGNORE #{options[:ignore]} LINES" if options[:ignore] q << " (#{options[:columns].join(',')})" if options[:columns] + + @connection = Mysql.new([EMAIL PROTECTED]) + execute(q) end Things seem to be working. It appears that if close() gets run on a Mysql object, you can no longer use LOAD DATA LOCAL INFILE, even if you call real_reconnect(). You have to actually create a new object. However, according to here: http://dev.rubyonrails.org/ticket/9688 the behavior is different (possibly the opposite) when using the pure-Ruby Mysql gem. Does anyone know what kinds of problems I could run into by adding the above line? Will I be messing up all my other active record objects? Cheers, Paul On Feb 19, 2008 7:07 PM, Paul Cortens <[EMAIL PROTECTED]> wrote: > Hi, > > I did some hacking around with the tests for the mysql-2.7 gem, and I can > get it to do a bulk import without an error. I didn't go through all of the > options (like delimited by, etc). > > However, when I tried running the adapter_extensions tests, I got errors. > I even tried overriding the execute method to remove logging, but that made > no difference. > > I am running out of ideas. Maybe active record uses some weird > configuration with MySQL??? > > Paul > > > On Feb 15, 2008 4:11 PM, Marty Haught <[EMAIL PROTECTED]> wrote: > > > ---------- Forwarded message ---------- > > From: Chris Williams <[EMAIL PROTECTED]> > > Date: Fri, Feb 15, 2008 at 5:09 PM > > Subject: Re: [Activewarehouse-discuss] problems using bulk_import (to > > mysql on win xp) > > To: Marty Haught <[EMAIL PROTECTED]> > > > > > > I just did a gem list on my windows box and this is what it showed for > > mysql > > > > mysql (2.7.1) > > A win32-native build of the MySQL API module for Ruby. > > > > I would uninstall the mysql gem and reinstall to make sure you are > > using the win32 version. > > > > Chris > > _______________________________________________ > > Activewarehouse-discuss mailing list > > Activewarehouse-discuss@rubyforge.org > > http://rubyforge.org/mailman/listinfo/activewarehouse-discuss > > > > > > -- > > > Ezk. 36 -- Ezk. 36
_______________________________________________ Activewarehouse-discuss mailing list Activewarehouse-discuss@rubyforge.org http://rubyforge.org/mailman/listinfo/activewarehouse-discuss