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
219
219
# database error will occur because the savepoint has already been
220
220
# automatically released. The following example demonstrates the problem:
221
221
#
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!
228
227
#
229
228
# Note that "TRUNCATE" is also a MySQL DDL statement!
230
229
module ClassMethods
You can’t perform that action at this time.
0 commit comments