Evolve
Evolve copied to clipboard
Long running MySQL DDL queries throw Rollback Exception
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.
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