Command timeouts are now implemented by first attempting to cancel the query server-side. If this succeeds, a MySqlException will be thrown with the code QueryInterrupted.
This proposes that the error code be changed to CommandTimeoutExpired, so it's uniform for whether soft- or hard-cancellation happens for a command timeout, and QueryInterrupted is used only for MySqlCommand.Cancel. This reverts the decision in #455 (comment):
If the server-side cancellation is successful, the Execute/Read/etc. method will throw a MySqlException with an ErrorCode set to MySqlErrorCode.QueryInterrupted. This is a change from current behaviour, which throws a MySqlException with MySqlErrorCode.CommandTimeoutExpired.
This change will restore the behaviour to how it was prior to 1.1.0. For clients that need to distinguish server-side vs client-side command timeout, an InnerException could hold the QueryInterrupted error code.
Command timeouts are now implemented by first attempting to cancel the query server-side. If this succeeds, a MySqlException will be thrown with the code
QueryInterrupted.This proposes that the error code be changed to
CommandTimeoutExpired, so it's uniform for whether soft- or hard-cancellation happens for a command timeout, andQueryInterruptedis used only forMySqlCommand.Cancel. This reverts the decision in #455 (comment):This change will restore the behaviour to how it was prior to 1.1.0. For clients that need to distinguish server-side vs client-side command timeout, an
InnerExceptioncould hold theQueryInterruptederror code.