KILL CONNECTION

Kill the connection on the specified thread. Rolls back any query running on the thread.

Syntax

KILL [CONNECTION | QUERY] thread_id

Remarks

  • thread_id - ID of the thread to kill. Find by running SHOW_PROCESSLIST.
  • KILL CONNECTION Will disconnect the client associated with thread_id. This is the default.
  • KILL QUERY Will not disconnect the client associated with thread_id. Instead, the client will receive an error.
  • Any query running on the connection will be rolled back.
  • MemSQL checks for the kill bit during any potentially long running loop during query execution and rolls back the query’s transaction if the kill bit is set.
  • This command must be run on the same node as the query to be killed.
  • This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands).

Example

memsql> KILL CONNECTION 3123;
Query OK, 0 rows affected (0.00 sec)

Related Topics

Was this article useful?