其他分享
首页 > 其他分享> > Laravel 嵌套事务 transactions

Laravel 嵌套事务 transactions

作者:互联网

Laravel 嵌套事务 transactions

前言

关于 mysql 的事务嵌套可以查看这个地址:
https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html

里面有这么一句话

Transactions cannot be nested. This is a consequence of the implicit commit performed for any current transaction when you issue a START TRANSACTION statement or one of its synonyms.

大体意思是 db 不支持事务嵌套,如果你嵌套执行 START TRANSACTION 时会隐式执行 commit

我们做个测试:

mysql>  BEGIN;
Query OK

标签:Laravel,事务,TRANSACTION,transactions,嵌套,mysql,commit
来源: https://blog.csdn.net/weiguang102/article/details/119445068