I have 2 store procedures A, B, both are in a transaction block. The problems is A calls B, so, there is recursive/nested transaction. I'm not sure is there problem? What will happen when I call A?
Cited from "MySQL Stored Procedure Programming":
START TRANSACTION
signifies the commencement of a new transaction. If an existing transaction is already in progress, thenSTART TRANSACTION
will issue an implicitCOMMIT
. When you issueSTART TRANSACTION
, the autocommit property (described in the next section) is effectively and implicitly set to 0 until the transaction ends. We recommend that you explicitly commit or roll back existing transactions before anySTART TRANSACTION
statements, since the implicitCOMMIT
might not be obvious to someone reading or maintaining your code.