Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.5.19, 6.2.2
-
None
Description
To reproduce, run the following SQL with the mariadb client with --delimiter=// option:
BEGIN NOT ATOMIC SET @a = NOW(); WHILE TIME_TO_SEC(TIMEDIFF(NOW(), @a)) < 30 DO DO 1; END WHILE; END // |
Once the query has started, interrupt it with Ctrl+C. With a direct connection to the database the connection is killed immediately but with MaxScale the KILL command it generates doesn't end up being processed correctly.
There's possibly a race condition of sorts where the execution of the sub-KILL commands that are derived from the original one end up being discarded due to the fact that the session is stopping. If this is true then the solution is to wait until all the sent commands have been written to the network before the OK packet is sent for the original KILL command.