Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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