diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-03-02 14:36:06 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-03-02 14:36:06 +0000 |
commit | 215852745beae6cb4d61d2affff07cc1b2ef0186 (patch) | |
tree | 5d95424b2b01edae6bbf0c41e4aae79cd38e20b9 /activerecord | |
parent | a4c6442612b50574795a52add5b9405f7028aab3 (diff) | |
download | rails-215852745beae6cb4d61d2affff07cc1b2ef0186.tar.gz rails-215852745beae6cb4d61d2affff07cc1b2ef0186.tar.bz2 rails-215852745beae6cb4d61d2affff07cc1b2ef0186.zip |
Revert allow_concurrency change for better testing. Retrieve_connection in two steps to avoid side-effect bug (yuk).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 9edd03e80c..4e1d308285 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -310,7 +310,7 @@ module ActiveRecord #:nodoc: # Determines whether or not to use a connection for each thread, or a single shared connection for all threads. # Defaults to false. Set to true if you're writing a threaded application. cattr_accessor :allow_concurrency - @@allow_concurrency = false + @@allow_concurrency = true # Determines whether to speed up access by generating optimized reader # methods to avoid expensive calls to method_missing when accessing diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb index a65d6df6a1..7cb230fd3a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb @@ -55,7 +55,8 @@ module ActiveRecord conn else # retrieve_connection sets the cache key. - active_connections[@active_connection_name] = retrieve_connection + conn = retrieve_connection + active_connections[@active_connection_name] = conn end end |