From f5fa21321e6bcb0a09de5c03fb3384fc0b6da7b8 Mon Sep 17 00:00:00 2001 From: qiancai Date: Tue, 9 May 2023 13:49:09 +0800 Subject: [PATCH 1/4] Update tidb-configuration-file.md --- tidb-configuration-file.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 80c61eb12c6d4..8f2f209bb79d6 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -78,8 +78,12 @@ The TiDB configuration file supports more options than command-line parameters. + Determines whether to set the `KILL` statement to be MySQL compatible. + Default value: `false` -+ The behavior of `KILL xxx` in TiDB differs from the behavior in MySQL. TiDB requires the `TIDB` keyword, namely, `KILL TIDB xxx`. If `compatible-kill-query` is set to `true`, the `TIDB` keyword is not needed. -+ This distinction is important because the default behavior of the MySQL command-line client, when the user hits Ctrl+C, is to create a new connection to the backend and execute the `KILL` statement in that new connection. If a load balancer or proxy has sent the new connection to a different TiDB server instance than the original session, the wrong session could be terminated, which could cause interruption to applications using the cluster. Enable `compatible-kill-query` only if you are certain that the connection you refer to in your `KILL` statement is on the same server to which you send the `KILL` statement. ++ `compatible-kill-query` takes effect only when [`enable-global-kill`](#enable-global-kill-introduced since -v610-) is set to `false`. ++ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `false`, `compatible-kill-query` controls whether killing a query needs to append the `TIDB` keyword. + - When `compatible-kill-query` is `false`, the behavior of `KILL xxx` in TiDB is different from that in MySQL. To kill a query in TiDB, you need to append the `TIDB` keyword, such as `KILL TIDB xxx`. + - When `compatible-kill-query` is `true`, to kill a query in TiDB, there is no need to append the `TIDB` keyword. It is **STRONGLY NOT RECOMMENDED** to set `compatible-kill-query` to `true` in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB instance. This is because pressing ctrl+c in the default MySQL client opens a new connection in which `KILL` is executed. If there is a proxy between the client and the TiDB cluster, the new connection might be routed to a different TiDB instance, which possibly kills a different session by mistake. ++ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `true`, `KILL xxx` and `KILL TIDB xxx` have the same effect, but using Ctrl+C to terminate a query is not supported. ++ For more information about the `KILL` statement, see [KILL [TIDB]](/sql-statements/sql-statement-kill.md). ### `check-mb4-value-in-utf8` From deaba6ffaec1427222b2699bceb17705c047da0c Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 9 May 2023 13:55:11 +0800 Subject: [PATCH 2/4] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 8f2f209bb79d6..4acf78ca0c6f8 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -78,7 +78,7 @@ The TiDB configuration file supports more options than command-line parameters. + Determines whether to set the `KILL` statement to be MySQL compatible. + Default value: `false` -+ `compatible-kill-query` takes effect only when [`enable-global-kill`](#enable-global-kill-introduced since -v610-) is set to `false`. ++ `compatible-kill-query` takes effect only when [`enable-global-kill`](#enable-global-kill-new-in-v610) is set to `false`. + When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `false`, `compatible-kill-query` controls whether killing a query needs to append the `TIDB` keyword. - When `compatible-kill-query` is `false`, the behavior of `KILL xxx` in TiDB is different from that in MySQL. To kill a query in TiDB, you need to append the `TIDB` keyword, such as `KILL TIDB xxx`. - When `compatible-kill-query` is `true`, to kill a query in TiDB, there is no need to append the `TIDB` keyword. It is **STRONGLY NOT RECOMMENDED** to set `compatible-kill-query` to `true` in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB instance. This is because pressing ctrl+c in the default MySQL client opens a new connection in which `KILL` is executed. If there is a proxy between the client and the TiDB cluster, the new connection might be routed to a different TiDB instance, which possibly kills a different session by mistake. From b879ee3ebd4e149c94ee4a8ba7be9a83b277a882 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 9 May 2023 13:59:58 +0800 Subject: [PATCH 3/4] Update tidb-configuration-file.md --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 4acf78ca0c6f8..9ad7eb4d7ba23 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -82,7 +82,7 @@ The TiDB configuration file supports more options than command-line parameters. + When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `false`, `compatible-kill-query` controls whether killing a query needs to append the `TIDB` keyword. - When `compatible-kill-query` is `false`, the behavior of `KILL xxx` in TiDB is different from that in MySQL. To kill a query in TiDB, you need to append the `TIDB` keyword, such as `KILL TIDB xxx`. - When `compatible-kill-query` is `true`, to kill a query in TiDB, there is no need to append the `TIDB` keyword. It is **STRONGLY NOT RECOMMENDED** to set `compatible-kill-query` to `true` in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB instance. This is because pressing ctrl+c in the default MySQL client opens a new connection in which `KILL` is executed. If there is a proxy between the client and the TiDB cluster, the new connection might be routed to a different TiDB instance, which possibly kills a different session by mistake. -+ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `true`, `KILL xxx` and `KILL TIDB xxx` have the same effect, but using Ctrl+C to terminate a query is not supported. ++ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `true`, `KILL xxx` and `KILL TIDB xxx` have the same effect, but using Ctrl+C to kill a query is not supported. + For more information about the `KILL` statement, see [KILL [TIDB]](/sql-statements/sql-statement-kill.md). ### `check-mb4-value-in-utf8` From 85071c3f2453f29b32a62b831e5de1607635d2d7 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 9 May 2023 16:05:13 +0800 Subject: [PATCH 4/4] Update tidb-configuration-file.md Co-authored-by: Aolin --- tidb-configuration-file.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 9ad7eb4d7ba23..39b5654401bd2 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -79,10 +79,10 @@ The TiDB configuration file supports more options than command-line parameters. + Determines whether to set the `KILL` statement to be MySQL compatible. + Default value: `false` + `compatible-kill-query` takes effect only when [`enable-global-kill`](#enable-global-kill-new-in-v610) is set to `false`. -+ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `false`, `compatible-kill-query` controls whether killing a query needs to append the `TIDB` keyword. ++ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `false`, `compatible-kill-query` controls whether you need to append the `TIDB` keyword when killing a query. - When `compatible-kill-query` is `false`, the behavior of `KILL xxx` in TiDB is different from that in MySQL. To kill a query in TiDB, you need to append the `TIDB` keyword, such as `KILL TIDB xxx`. - - When `compatible-kill-query` is `true`, to kill a query in TiDB, there is no need to append the `TIDB` keyword. It is **STRONGLY NOT RECOMMENDED** to set `compatible-kill-query` to `true` in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB instance. This is because pressing ctrl+c in the default MySQL client opens a new connection in which `KILL` is executed. If there is a proxy between the client and the TiDB cluster, the new connection might be routed to a different TiDB instance, which possibly kills a different session by mistake. -+ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `true`, `KILL xxx` and `KILL TIDB xxx` have the same effect, but using Ctrl+C to kill a query is not supported. + - When `compatible-kill-query` is `true`, to kill a query in TiDB, there is no need to append the `TIDB` keyword. It is **STRONGLY NOT RECOMMENDED** to set `compatible-kill-query` to `true` in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB instance. This is because pressing Control+C in the default MySQL client opens a new connection in which `KILL` is executed. If there is a proxy between the client and the TiDB cluster, the new connection might be routed to a different TiDB instance, which possibly kills a different session by mistake. ++ When [`enable-global-kill`](#enable-global-kill-new-in-v610) is `true`, `KILL xxx` and `KILL TIDB xxx` have the same effect, but using Control+C to kill a query is not supported. + For more information about the `KILL` statement, see [KILL [TIDB]](/sql-statements/sql-statement-kill.md). ### `check-mb4-value-in-utf8`