Permalink
Browse files

switch over to Mysql2::Client#ping for the mysql2 connection check

  • Loading branch information...
brianmario authored and tenderlove committed Feb 13, 2011
1 parent 0e9c7a2 commit 7eb554bdb13d3469712b847add2ab0054f0698c7
Showing with 1 addition and 4 deletions.
  1. +1 −4 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -197,10 +197,7 @@ def disable_referential_integrity(&block) #:nodoc:
def active?
return false unless @connection
@connection.query 'select 1'
true
rescue Mysql2::Error
false
@connection.ping
end
def reconnect!

0 comments on commit 7eb554b

Please sign in to comment.