Made sure that connections are only removed for SQLite

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 312e6edf
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册