相关文章推荐
坚韧的丝瓜  ·  量子電腦的原理、挑戰與未來衝擊| 國家實驗研究院·  4 月前    · 
求醉的杯子  ·  2020欧洲杯决赛首发阵容_2020年欧冠决 ...·  6 月前    · 
打酱油的槟榔  ·  2024年光迅科技=2023年中际旭创 20 ...·  1 年前    · 
帅呆的茴香  ·  vue,按钮控制div显示与隐藏_vue隐藏 ...·  1 年前    · 
寂寞的茄子  ·  压缩工具选型之zip、rar、tar/tar ...·  1 年前    · 
Code  ›  MySQL :: MySQL 5.7 Reference Manual :: 13.3.4 SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT Statements
https://dev.mysql.com/doc/refman/5.7/en/savepoint.html
玩足球的黄花菜
2 年前
Statements That Cause an Implicit Commit
SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT Statements
LOCK TABLES and UNLOCK TABLES Statements
SET TRANSACTION Statement
XA Transactions
XA Transaction SQL Statements
XA Transaction States
Restrictions on XA Transactions
CREATE FUNCTION Statement for Loadable Functions
DROP FUNCTION Statement for Loadable Functions
INSTALL PLUGIN Statement
UNINSTALL PLUGIN Statement
SAVEPOINT identifier
ROLLBACK [WORK] TO [SAVEPOINT] identifier
RELEASE SAVEPOINT identifier

InnoDB supports the SQL statements SAVEPOINT , ROLLBACK TO SAVEPOINT , RELEASE SAVEPOINT and the optional WORK keyword for ROLLBACK . The SAVEPOINT statement sets a named transaction savepoint with a name of identifier . If the current transaction has a savepoint with the same name, the old savepoint is deleted and a new one is set. The ROLLBACK TO SAVEPOINT statement rolls back a transaction to the named savepoint without terminating the transaction. Modifications that the current transaction made to rows after the savepoint was set are undone in the rollback, but InnoDB does not release the row locks that were stored in memory after the savepoint. (For a new inserted row, the lock information is carried by the transaction ID stored in the row; the lock is not separately stored in memory. In this case, the row lock is released in the undo.) Savepoints that were set at a later time than the named savepoint are deleted. If the ROLLBACK TO SAVEPOINT statement returns the following error, it means that no savepoint with the specified name exists:

ERROR 1305 (42000): SAVEPOINT identifier does not exist

The RELEASE SAVEPOINT statement removes the named savepoint from the set of savepoints of the current transaction. No commit or rollback occurs. It is an error if the savepoint does not exist. All savepoints of the current transaction are deleted if you execute a COMMIT , or a ROLLBACK that does not name a savepoint. A new savepoint level is created when a stored function is invoked or a trigger is activated. The savepoints on previous levels become unavailable and thus do not conflict with savepoints on the new level. When the function or trigger terminates, any savepoints it created are released and the previous savepoint level is restored.

 
推荐文章
坚韧的丝瓜  ·  量子電腦的原理、挑戰與未來衝擊| 國家實驗研究院
4 月前
求醉的杯子  ·  2020欧洲杯决赛首发阵容_2020年欧冠决赛首发阵容_新浪博客
6 月前
打酱油的槟榔  ·  2024年光迅科技=2023年中际旭创 2023年, 中际旭创 是光模块之王,2024年, 光迅科技 是新一代光模块之王。 光迅科技 光模块市占率国内第一,全球... - 雪球
1 年前
帅呆的茴香  ·  vue,按钮控制div显示与隐藏_vue隐藏div-CSDN博客
1 年前
寂寞的茄子  ·  压缩工具选型之zip、rar、tar/tar.gz、7z对比 - Granding - 博客园
1 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号