Permalink
Browse files

Simpler Mysql load test.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 119155b commit baad1c4cdce95b167f5b0a8329f853e58d6430a2 @jeremy jeremy committed Nov 21, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -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]

0 comments on commit baad1c4

Please sign in to comment.