提交 baad1c4c 编写于 作者: J Jeremy Kemper

Simpler Mysql load test.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 119155be
......@@ -5,7 +5,7 @@ class Base
# Establishes a connection to the database that's used by all Active Record objects.
def self.mysql_connection(config) # :nodoc:
# Only include the MySQL driver if one hasn't already been loaded
unless self.class.const_defined?(:Mysql)
unless defined? Mysql
begin
require_library_or_gem 'mysql'
# The C version of mysql returns null fields in each_hash if Mysql::VERSION is defined
......@@ -21,7 +21,7 @@ def self.mysql_connection(config) # :nodoc:
end
end
end
config = config.symbolize_keys
host = config[:host]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册