public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
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>
Nick Sieger (author)
Thu Sep 04 06:35:55 -0700 2008
jeremy (committer)
Thu Sep 04 06:45:00 -0700 2008
commit  0d9e238cc938c96708d36bbd2cd4736e9ec93a1e
tree    9d219f5447207e61da4cfd187e8d60df8966a058
parent  a3f12f575d4bf216a15188ecab2d26a11162bc3b
...
112
113
114
115
116
117
 
118
119
120
...
112
113
114
 
 
 
115
116
117
118
0
@@ -112,9 +112,7 @@ module ActiveRecord
0
       # ROLLBACK and swallows any exceptions which is probably not enough to
0
       # ensure the connection is clean.
0
       def reset!
0
-        silence_stderr do # postgres prints on stderr when you do this w/o a txn
0
-          execute "ROLLBACK" rescue nil
0
-        end
0
+        # this should be overridden by concrete adapters
0
       end
0
 
0
       # Returns true if its safe to reload the connection between requests for development mode.
...
286
287
288
289
290
291
292
293
...
286
287
288
 
 
289
290
291
0
@@ -286,8 +286,6 @@ module ActiveRecord
0
           # reset the connection is to change the user to the same user.
0
           @connection.change_user(@config[:username], @config[:password], @config[:database])
0
           configure_connection
0
-        else
0
-          super
0
         end
0
       end
0
 

Comments