mysql
mysql copied to clipboard
context cancellation closes the connection immediately, making it impossible to rollback the transaction
If I have a transaction that has been started with BeginTx, rows are added to a table using insert statements, and then the context passed in to BeginTx is cancelled, the connection is closed immediately, making it impossible to roll back the transaction, and the rows are commited. The expected behaviour would be to automatically roll back an interrupted transaction, or at least allow the user to do so.
Transaction is not committed until executing "commit". Connection close cause rollback, not commit.