Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Ngan's latest activity

Wednesday, February 16 2011
6266 Mysql "LOAD DATA LOCAL INFILE" does not work after reconnect was updated in Ruby on Rails
  • Ngan
    Ngan commented at 7:41 PM

    Here's a patch that I did in my Rails app to fix this:

    module ActiveRecord
      module ConnectionAdapters
        class MysqlAdapter
        private
          def connect_wit...
Friday, February 11 2011
6266 Mysql "LOAD DATA LOCAL INFILE" does not work after reconnect was updated in Ruby on Rails
  • Ngan
    Ngan commented at 11:15 PM

    Is this happening for anyone else?

Thursday, January 13 2011
6266 Mysql "LOAD DATA LOCAL INFILE" does not work after reconnect was updated in Ruby on Rails
  • Ngan
    • Title changed from Cannot execute mysql "LOAD DATA LOCAL INFILE" query after using verify_active_connections! to Mysql "LOAD DATA LOCAL INFILE" does not work after reconnect
    by Ngan at 8:48 PM
  • Ngan
    Ngan commented at 7:34 PM

    Awesome! I confirmed that it fixed it for me as well. Any case someone can make a patch for this?

    Jonathan, do update on how it goes with mysql2.

    Thanks!

Tuesday, January 11 2011
6266 Cannot execute mysql "LOAD DATA LOCAL INFILE" query after using verify_active... was updated in Ruby on Rails
  • Ngan
    Ngan commented at 6:04 PM

    I'm using Rails 2.3.8, so it's on the mysql gem (not mysql2). I've also updated to the latest gem version of mysql, and still get the same problem.

Monday, January 10 2011
6266 Cannot execute mysql "LOAD DATA LOCAL INFILE" query after using verify_active... was updated in Ruby on Rails
  • Ngan
    • Title changed from Cannot execute mysql "LOAD DATA INFILE" query after using verify_active_connections! to Cannot execute mysql "LOAD DATA LOCAL INFILE" query after using verify_active_connections!
    by Ngan at 10:28 PM
  • Ngan
    Ngan commented at 10:27 PM

    I've gone through all the MySQL documentation and made sure everything has permissions. You'll notice in my console output, the first I do the LOAD DATA LOCAL I...

Saturday, January 08 2011
6266 Cannot execute mysql "LOAD DATA INFILE" query after using verify_active_conne... was updated in Ruby on Rails
  • Ngan
    Ngan commented at 8:19 AM

    Actual console output

    ruby-1.8.6-p399 :003 > ActiveRecord::Base.connection.execute("LOAD DATA LOCAL INFILE '/tmp/test.infile' INTO TABLE users")
    [Sat Jan 08 00...
  • Ngan
    Ngan commented at 7:24 AM


    > ActiveRecord::Base.connection.disconnect! > ActiveRecord::Base.verify_active_connections! > ActiveRecord::Base.connection.execute("LOAD DATA INFILE '/tmp/som...

  • Ngan
    Ngan created the ticket at 7:23 AM

    Hi, I'm on Rails 2.3.8, but I think this problem affects Rails 3.x as well.

    After using ActiveRecord::Base.verify_active_connections! after the mysql going away...