Bug #38029 Federated requests are not auto-aborted when their originating connection dies
Submitted: 10 Jul 2008 19:36 Modified: 6 Aug 2008 10:22
Reporter: Shawn Green Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Federated storage engine Severity:S4 (Feature request)
Version:N/A OS:Any
Assigned to: CPU Architecture:Any

[10 Jul 2008 19:36] Shawn Green
Federated tables require a remote connection and remote processing to retrieve the information requested of them. Should the connection that originates this activity (the client connected to the server with the federated table) is either killed or self-aborts, the original remote request continues to process. 

How to repeat:
Setup two servers A and B

Create a table on server B

Create a table on server A that points to the table on server B

Connect to Server A and start a long query.

Disconnect from server A or kill the connection. 

Observe on server B that the FEDERATED connection from server A is still alive and active.

Suggested fix:
Forward a KILL request from the server that originates a FEDERATED data request to the server handling the FEDERATED data request whenever the originating server loses contact with the client connection that started the whole process.