mirror of
https://github.com/github/rails.git
synced 2026-01-29 16:28:09 -05:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user