kill命令应该显式标注在与被kill的会话在相同的TiDB Server上执行
@TomShawn is already working on this.
Since Oct 21, 2022.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 1.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 31
Description
File: /release-5.3/sql-statements/sql-statement-kill.md

这里修改查看会话信息的SQL,在kill命令之前添加连接TiDB的例子:
SELECT ID, USER, INSTANCE, INFO FROM INFORMATION_SCHEMA.CLUSTER_PROCESSLIST;
+---------------------+------+-----------------+-----------------------------------------------------------------------------+
| ID | USER | INSTANCE | INFO |
+---------------------+------+-----------------+-----------------------------------------------------------------------------+
| 1 | root | 127.0.0.1:10082 | select sleep(30), 'foo' |
| 2 | root | 127.0.0.1:10080 | select sleep(50) |
| 3 | root | 127.0.0.1:10080 | SELECT ID, USER, INSTANCE, INFO FROM INFORMATION_SCHEMA.CLUSTER_PROCESSLIST |
+---------------------+------+-----------------+-------------------------------------------------------------
2 rows in set (0.00 sec)
在与被kill会话相同 TiDB 节点上,执行 KILL TIDB 语句。
mysql -h127.0.0.1 -P10080 -uroot -p
KILL TIDB 3;
Query OK, 0 rows affected (0.00 sec)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.