8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

15.3.2 无法回滚的语句15.3.2 Statements That Cannot Be Rolled Back

某些语句无法回滚。一般来说,这些包括数据定义语言 (DDL) 语句,例如创建或删除数据库的语句,以及创建、删除或修改表或存储例程的语句。Some statements cannot be rolled back. In general, these include data definition language (DDL) statements, such as those that create or drop databases, those that create, drop, or alter tables or stored routines.

你应该设计事务时不要包含这些语句。如果在事务早期执行了无法回滚的语句,然后后续的另一个语句失败,在这种情况下通过执行ROLLBACK语句无法回滚事务的全部效果。You should design your transactions not to include such statements. If you issue a statement early in a transaction that cannot be rolled back, and then another statement later fails, the full effect of the transaction cannot be rolled back in such cases by issuing a ROLLBACK statement.