Skip to content
Browse files

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

  • Loading branch information...
1 parent 0e9c7a2 commit 7eb554bdb13d3469712b847add2ab0054f0698c7 @brianmario brianmario committed with tenderlove Feb 12, 2011
Showing with 1 addition and 4 deletions.
  1. +1 −4 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
View
5 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.
Something went wrong with that request. Please try again.