Skip to content

Commit

Permalink
MySQL: active? compatibility with the pure-Ruby driver. References #428.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Nov 28, 2005
1 parent e47c838 commit 75d0623
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions activerecord/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* MySQL: active? compatibility with the pure-Ruby driver. #428 [Jeremy Kemper]

* Oracle: active? check pings the database rather than testing the last command status. #428 [Michael Schoen]

* SQLServer: resolve column aliasing/quoting collision when using limit or offset in an eager find. #2974 [kajism@yahoo.com]
Expand Down
Expand Up @@ -150,7 +150,11 @@ def quoted_false
# 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
Expand Down

0 comments on commit 75d0623

Please sign in to comment.