Evolve icon indicating copy to clipboard operation
Evolve copied to clipboard

Long running MySQL DDL queries throw Rollback Exception

Open SteveMGits opened this issue 5 years ago • 1 comments

With a long running query that modifies DDL, and the timeout is exceeded, the following exception is thrown:

Unhandled Exception: System.InvalidOperationException: Connection must be valid and open to rollback transaction

I suspect this is because MySQL cannot rollback these kinds of queries, or that simply the error closes the connection and the rollback can not be executed. Extending the timeout to allow the query to complete resolves the issue.

Evolve Version: 1.8 Database: MySQL 5.6.27 OS: Windows 10 Framework: .NET 4.7.1

I would expect that, in this situation, an exception that more clearly states that the query has timed out and cannot be rolled back is thrown.

SteveMGits avatar Oct 12 '18 21:10 SteveMGits

I couldn't reproduce your scenario. Hard to understand what happened exactly. And hard to think of a solution that works for all databases Evolve supports. I would be happy to take a PR if you a something in mind.

Thanks for the feedback @SteveMGits

lecaillon avatar Nov 03 '19 22:11 lecaillon