Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
the effect should be similar to mysql_query("KILL <id>"), however this is for environment where creating a second connection to issue kill is not feasible.
mysql_close cannot be used because it deallocates the memory, which we do not want ( we do not want even to close the socket because it may have some interesting race conditions)
Specifically, this call is required inside the server to interrupt slave thread that is stuck in long read call. Currently, server uses mysql->net.vio of the slave connection to issue a vio_shutdown() which comes down to either socket shutdown() call, or to CancelIoEx(), or to setting some event for shared memory. This will make further calls than require IO fail, without deallocating or invalidating the rest of MYSQL struct.
There is no NET and no VIO in Connector/C, we do not want to expose there structures, the high-level new call should be mysql_cancel(MYSQL *mysql) , or mysql_abort(MYSQL *mysql) that does the job of killing the connection pointed to my `mysql` parameter slightly less gracefully than a KILL would do (but more reliable and much cheaper and faster)
Attachments
Issue Links
- blocks
-
MDEV-9293 change clients to use Connector/C
- Closed