Skip to content

Commit

Permalink
Made sure that connections are only removed for SQLite
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Jan 15, 2007
1 parent 312e6ed commit 6d37c63
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ def clear_active_connections!
# Clears the cache which maps classes # Clears the cache which maps classes
def clear_reloadable_connections! def clear_reloadable_connections!
@@active_connections.each do |name, conn| @@active_connections.each do |name, conn|
conn.disconnect! if conn.supports_reloading? if conn.requires_reloading?
@@active_connections.delete(name) conn.disconnect!
@@active_connections.delete(name)
end
end end
end end


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def disconnect!


# Returns true if its safe to reload the connection between requests for development mode. # 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. # 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 false
end end


Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def supports_migrations? #:nodoc:
true true
end end


def supports_reloading? def requires_reloading?
true true
end end


Expand Down

0 comments on commit 6d37c63

Please sign in to comment.