Skip to content

[9.x] fix pdo exception when rollbacking without active transaction#46017

Merged
taylorotwell merged 1 commit intolaravel:9.xfrom
khalyomede:fix-there-is-no-active-transaction-error
Feb 8, 2023
Merged

[9.x] fix pdo exception when rollbacking without active transaction#46017
taylorotwell merged 1 commit intolaravel:9.xfrom
khalyomede:fix-there-is-no-active-transaction-error

Conversation

@khalyomede
Copy link
Contributor

This PR prevents an issue when trying to rollback when there is no active database transaction.

I faced this issue when I converted my tests suites (which uses LazilyRefreshDatabase trait) from SQLite (in memory) to MySQL, which seems to behave differently regarding the transaction verification (SQLite is more permissive).

@khalyomede
Copy link
Contributor Author

khalyomede commented Feb 7, 2023

This may fix:

I also note there is failing tests about dead lock not retried, but the assertion seems not about dead lock: it is just an attempt to commit without an existing pending transaction (which in my opinion is not related). Not sure if these tests should be refined.

@taylorotwell taylorotwell merged commit 4b5ef9e into laravel:9.x Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants