Skip to content
Browse files

Fix connection reloading in development mode. [#4929 state:resolved]

Signed-off-by: José Valim <>
  • Loading branch information...
1 parent c0fc084 commit 62c4e4d3856b38ee9869f4ad6342e712788c8635 @ebeigarts ebeigarts committed with josevalim Jun 22, 2010
4 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -144,7 +144,9 @@ def clear_reloadable_connections!
@connections.each do |conn|
conn.disconnect! if conn.requires_reloading?
- @connections = []
+ @connections.delete_if do |conn|
+ conn.requires_reloading?
+ end
# Verify active connections and remove and disconnect connections
5 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -142,9 +142,10 @@ def reset!
# this should be overridden by concrete adapters
- # Returns true if its safe to reload the connection between requests for development mode.
+ # Returns true if its required to reload the connection between requests for development mode.
+ # This is not the case for Ruby/MySQL and it's not necessary for any adapters except SQLite.
def requires_reloading?
- true
+ false
# Checks whether the connection to the database is still active (i.e. not stale).

0 comments on commit 62c4e4d

Please sign in to comment.
Something went wrong with that request. Please try again.