public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Fix failure to retain value of allow_concurrency

- Also carry allow_concurrency value through to connection adapter
  (for postgresql)
Nick (author)
Sat Apr 19 21:11:28 -0700 2008
commit  37b0b36918f14519b28326057bba38ca6fcfbd3b
tree    1b8589df269d81a3defbe775f709735be1c512c6
parent  cab76ce6ac2983f59451e2d53b23746a2873aea0
...
97
98
99
100
 
 
101
102
103
...
97
98
99
 
100
101
102
103
104
0
@@ -97,7 +97,8 @@ module ActiveRecord
0
         if spec.kind_of?(ActiveRecord::ConnectionAdapters::AbstractAdapter)
0
           active_connections[active_connection_name] = spec
0
         elsif spec.kind_of?(ActiveRecord::Base::ConnectionSpecification)
0
-          self.set_connection ActiveRecord::Base.send(spec.adapter_method, spec.config)
0
+          config = spec.config.reverse_merge(:allow_concurrency => ActiveRecord::Base.allow_concurrency)
0
+          self.set_connection ActiveRecord::Base.send(spec.adapter_method, config)
0
         else
0
           raise ConnectionNotEstablished
0
         end
...
31
32
33
 
34
35
36
...
31
32
33
34
35
36
37
0
@@ -31,6 +31,7 @@ module ActiveRecord
0
       # multi-threaded access of the connection pools hash is synchronized.
0
       def allow_concurrency=(flag)
0
         if @@allow_concurrency != flag
0
+          @@allow_concurrency = flag
0
           if flag
0
             self.connection_pools_lock = Monitor.new
0
           else

Comments