Open
Description
MySqlCommand.Cancel
attempts to ensure that KILL QUERY
runs on the correct server by connecting directly to its IP address:
MySqlConnector/src/MySqlConnector/MySqlConnection.cs
Lines 913 to 921 in 4cbcfc7
In a layer 4 load balancing scenario, this might not be sufficient. Running SELECT @@server_uuid;
or SELECT @@server_id;
at connection establishment time (depending on which servers support those system variables) could provide a unique ID that the Cancel
implementation could check before it cancels the query. This would avoid cancelling a query that just happens to use the same server thread ID on a different server.