Permalink
Browse files

Made sure that connections are only removed for SQLite

git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 5d0fd52 commit 517628d028222199978587620ca1735607b02f2e @dhh dhh committed Jan 15, 2007
@@ -90,8 +90,10 @@ def clear_active_connections!
# Clears the cache which maps classes
def clear_reloadable_connections!
@@active_connections.each do |name, conn|
- conn.disconnect! if conn.supports_reloading?
- @@active_connections.delete(name)
+ if conn.requires_reloading?
+ conn.disconnect!
+ @@active_connections.delete(name)
+ end
end
end
@@ -81,7 +81,7 @@ def disconnect!
# Returns true if its safe 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 supports_reloading?
+ def requires_reloading?
false
end
@@ -102,7 +102,7 @@ def supports_migrations? #:nodoc:
true
end
- def supports_reloading?
+ def requires_reloading?
true
end

0 comments on commit 517628d

Please sign in to comment.