提交 bec81dca 编写于 作者: J Jon Moss 提交者: GitHub

Merge pull request #25536 from alexcameron89/update-transactions

[ci skip] Clarify DDL term in ActiveRecord::Transactions
......@@ -189,8 +189,8 @@ module Transactions
#
# === Caveats
#
# If you're on MySQL, then do not use DDL operations in nested transactions
# blocks that are emulated with savepoints. That is, do not execute statements
# If you're on MySQL, then do not use Data Definition Language(DDL) operations in nested
# transactions blocks that are emulated with savepoints. That is, do not execute statements
# like 'CREATE TABLE' inside such blocks. This is because MySQL automatically
# releases all savepoints upon executing a DDL operation. When +transaction+
# is finished and tries to release the savepoint it created earlier, a
......@@ -480,11 +480,11 @@ def has_transactional_callbacks? # :nodoc:
# Updates the attributes on this particular Active Record object so that
# if it's associated with a transaction, then the state of the Active Record
# object will be updated to reflect the current state of the transaction
# object will be updated to reflect the current state of the transaction.
#
# The +@transaction_state+ variable stores the states of the associated
# transaction. This relies on the fact that a transaction can only be in
# one rollback or commit (otherwise a list of states would be required)
# one rollback or commit (otherwise a list of states would be required).
# Each Active Record object inside of a transaction carries that transaction's
# TransactionState.
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册