-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[FEATURE] MySQL KILL connection id #12038
Copy link
Copy link
Closed
Labels
Description
Pressing CTRL-C during long-running query results in MySQL client, it will send a 'KILL [connection_id]' to clickhouse-server with a new connection, the server returns an error and the MySQL client will be stuck.
client:
mysql> select * from system.numbers order by number asc limit 1;
^C^C -- query aborted
^C^C -- query aborted
server log:
2020.06.29 22:53:19.689413 [ 14882 ] {} <Information> MySQLHandler: Authentication for user default succeeded.
2020.06.29 22:53:19.689549 [ 14882 ] {} <Debug> MySQLHandler: Received command: 3. Connection id: 2.
2020.06.29 22:53:19.690113 [ 14882 ] {} <Debug> executeQuery: (from 127.0.0.1:34142) KILL QUERY 0
2020.06.29 22:53:19.690329 [ 14882 ] {} <Error> executeQuery: Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 12: 0. Expected one of: ON, WHERE (version 20.6.1.1) (from 127.0.0.1:34142) (in query: KILL QUERY 0), Stack trace (when copying this message, always include the lines below):
... ...
Reactions are currently unavailable