Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove flawed execute("ROLLBACK") approach; #reset! defaults to nothing

Will need community help to fill out what #reset! should do for each adapter

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 0d9e238cc938c96708d36bbd2cd4736e9ec93a1e 1 parent a3f12f5
@nicksieger nicksieger authored jeremy committed
View
4 activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -112,9 +112,7 @@ def disconnect!
# ROLLBACK and swallows any exceptions which is probably not enough to
# ensure the connection is clean.
def reset!
- silence_stderr do # postgres prints on stderr when you do this w/o a txn
- execute "ROLLBACK" rescue nil
- end
+ # this should be overridden by concrete adapters
end
# Returns true if its safe to reload the connection between requests for development mode.
View
2  activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -286,8 +286,6 @@ def reset!
# reset the connection is to change the user to the same user.
@connection.change_user(@config[:username], @config[:password], @config[:database])
configure_connection
- else
- super
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.