提交 75d0623b 编写于 作者: J Jeremy Kemper

MySQL: active? compatibility with the pure-Ruby driver. References #428.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3194 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 e47c8381
*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]
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册