Skip to content

Commit

Permalink
Update sql-statements/sql-statement-kill.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn authored and ti-chi-bot committed Sep 2, 2021
1 parent 6dc8126 commit 7f4757a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql-statements/sql-statement-kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Query OK, 0 rows affected (0.00 sec)

* 按照设计,`KILL` 语句默认与 MySQL 不兼容。负载均衡器后面通常放有多个 TiDB 服务器,这种默认不兼容有助于防止在错误的 TiDB 服务器上终止连接。
***不要**在配置文件里设置 [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query)**除非**你确定客户端将始终连接到同一个 TiDB 节点。这是因为当你在默认的 MySQL 客户端按下 <kbd>ctrl</kbd>+<kbd>c</kbd> 时,客户端会开启一个新连接,并在这个新连接中执行 `KILL` 语句。此时,如果客户端和 TiDB 中间有代理,新连接可能会被路由到其他的 TiDB 节点,从而错误地终止其他会话。
* `KILL TIDB` 语句是 TiDB 的扩展语法,其功能与 MySQL 命令 `KILL [CONNECTION|QUERY]` 和 MySQL 命令行的 <kbd>ctrl</kbd>+<kbd>c</kbd> 功能相同。在同一个 TiDB 节点上,你可以安全地使用 `KILL TIDB` 语句。
* `KILL TIDB` 语句是 TiDB 的扩展语法,其功能与 MySQL 命令 `KILL [CONNECTION|QUERY]` 和 MySQL 命令行的 <kbd>ctrl</kbd>+<kbd>c</kbd> 相同。在同一个 TiDB 节点上,你可以安全地使用 `KILL TIDB` 语句。

## 另请参阅

Expand Down

0 comments on commit 7f4757a

Please sign in to comment.