[MXS-959] KILL command on wrong connection ID Created: 2016-10-27  Updated: 2017-09-26  Resolved: 2017-05-12

Status: Closed
Project: MariaDB MaxScale
Component/s: Core, mariadbclient
Affects Version/s: None
Fix Version/s: 2.2.0

Type: Bug Priority: Major
Reporter: Diego Dupin Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MXS-1452 Add support for KILL QUERY <id> Closed
Sprint: 2017-30, 2017-31, 2017-32, 2017-33

 Description   

in Greating packet, maxscale does give a connection Id that isn't a real connection ID, but a fake connection id.

problem is this connection id is used in connectors.
In java connector (MariaDB and MySQL) it's used for mostly 2 things : Statement.cancel(), and Statement.setQueryTimeout()

When a query must be canceled or if timeout is reached, driver will create a new connection, and execute a "KILL QUERY XXX" (XXX the fake connection id).

This doesn't work when using maxscale :

  • server will throw a "Unknown thread id: XXX"
  • or if on server there is a connection that has the bad luck of having a corresponding connection id, it will killed .

Maxscale,as a proxy, must intercept query like "KILL [HARD | SOFT] [CONNECTION | QUERY ] thread_id"
and execute the kill command on the good server with real thread id.



 Comments   
Comment by Esa Korhonen [ 2017-05-12 ]

Support for "KILL QUERY <thread_id>" requires changes to how sessions and dcb:s are managed, so that was left for a later date.

Generated at Thu Feb 08 04:03:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.