I want to test a script what it does when MySQL transaction fails. So I want to simulate transaction failure on COMMIT
.
Image the script opens a transaction, makes some queries, and then commits the transaction. I want to implant some extra query to the transaction, to ensure the transaction will fail on COMMIT
. So I can test how the script recovers from the transation failure.
I don't want to use explicit ROLLBACK
. I want to simulate some real-life case when a commit fails. The exact DB structure is unimportant. It may adapt to the solution.
Aucun commentaire:
Enregistrer un commentaire