File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
activerecord/lib/active_record Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,11 @@ module Transactions
219219 # database error will occur because the savepoint has already been
220220 # automatically released. The following example demonstrates the problem:
221221 #
222- # Model.lease_connection.transaction do # BEGIN
223- # Model.lease_connection.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1
224- # Model.lease_connection.create_table(...) # active_record_1 now automatically released
225- # end # RELEASE SAVEPOINT active_record_1
226- # # ^^^^ BOOM! database error!
227- # end
222+ # Model.transaction do # BEGIN
223+ # Model.transaction(requires_new: true) do # CREATE SAVEPOINT active_record_1
224+ # Model.lease_connection.create_table(...) # active_record_1 now automatically released
225+ # end # RELEASE SAVEPOINT active_record_1
226+ # end # ^^^^ BOOM! database error!
228227 #
229228 # Note that "TRUNCATE" is also a MySQL DDL statement!
230229 module ClassMethods
You can’t perform that action at this time.
0 commit comments