You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement CancellationToken support in Async methods.
Instead of cancelling the current socket operation as soon as possible (which might leave the connection in an unknown state), cancelling the CancellationToken triggers MySqlCommand.Cancel, which executes "KILL QUERY n" against the database, logically terminating the current statement.
This should result in the eventual cancellation of the query and OperationCanceledException being raised on a subsequent call to ReadAsync (or similar). We assume that the same CancellationToken keeps being passed to all DB methods involved in reading a single result set, and that the slight delay in actual cancellation is not significant to the caller.
// the default MySQL Server value for max_allowed_packet (in MySQL 5.7) is 4MiB: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet
70
-
// use "decimal megabytes" (to round up) when creating the exception message
// the default MySQL Server value for max_allowed_packet (in MySQL 5.7) is 4MiB: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_allowed_packet
77
+
// use "decimal megabytes" (to round up) when creating the exception message
0 commit comments