diff options
author | Brian Lopez <seniorlopez@gmail.com> | 2011-02-12 16:54:27 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-12 16:59:13 -0800 |
commit | 7eb554bdb13d3469712b847add2ab0054f0698c7 (patch) | |
tree | 0e6d5eace8cdac61304dfa12ef448ef3f06d8416 /activerecord | |
parent | 0e9c7a265f559d3f410e04effc207695aaf3b4c2 (diff) | |
download | rails-7eb554bdb13d3469712b847add2ab0054f0698c7.tar.gz rails-7eb554bdb13d3469712b847add2ab0054f0698c7.tar.bz2 rails-7eb554bdb13d3469712b847add2ab0054f0698c7.zip |
switch over to Mysql2::Client#ping for the mysql2 connection check
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 74dd7e8491..7bad511c64 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -197,10 +197,7 @@ module ActiveRecord def active? return false unless @connection - @connection.query 'select 1' - true - rescue Mysql2::Error - false + @connection.ping end def reconnect! |