diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 76ea6e6530..c43a84a386 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -150,7 +150,11 @@ module ActiveRecord # CONNECTION MANAGEMENT ==================================== def active? - @connection.stat if @connection.respond_to?(:stat) + if @connection.respond_to?(:stat) + @connection.stat + else + @connection.query 'select 1' + end true rescue Mysql::Error false |