From 4012054eac7cc49c9c9c0ef7dccba4675dfa4338 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 24 Aug 2021 18:09:23 +0800 Subject: [PATCH 1/9] sql: improve kill's description Signed-off-by: Weizhen Wang --- sql-statements/sql-statement-kill.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 2d986bc64db10..4ba5f3ac593c8 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -34,8 +34,9 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility -* By design, this statement is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. -* The `KILL TIDB` statement is a TiDB extension. If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. +* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. +* You can use `KILL` statment If you are certain that the session you are attempting to kill is on the same TiDB server and set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. +* The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. ## See also From 596ffb075c31d2df298dbf7b1cf0445e35386b8f Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Tue, 24 Aug 2021 18:09:23 +0800 Subject: [PATCH 2/9] sql: improve kill's description Signed-off-by: Weizhen Wang --- sql-statements/sql-statement-kill.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 2d986bc64db10..4ba5f3ac593c8 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -34,8 +34,9 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility -* By design, this statement is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. -* The `KILL TIDB` statement is a TiDB extension. If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. +* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. +* You can use `KILL` statment If you are certain that the session you are attempting to kill is on the same TiDB server and set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. +* The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. ## See also From 7e3e9feca87aa77357de8112f4987a88b4c9b58e Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 25 Aug 2021 10:55:43 +0800 Subject: [PATCH 3/9] Update sql-statements/sql-statement-kill.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- sql-statements/sql-statement-kill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 4ba5f3ac593c8..1d523b0bea353 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -35,7 +35,7 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility * By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. -* You can use `KILL` statment If you are certain that the session you are attempting to kill is on the same TiDB server and set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. +* If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. * The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. ## See also From 99b7906d7417d2cedd3480293eb662cfbbed7d56 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 25 Aug 2021 10:57:30 +0800 Subject: [PATCH 4/9] sql: improve kill's description Signed-off-by: Weizhen Wang --- sql-statements/sql-statement-kill.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 0da6cc4baa74a..8a15eec2fd976 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -34,12 +34,7 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility -* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. -<<<<<<< HEAD -* You can use `KILL` statment If you are certain that the session you are attempting to kill is on the same TiDB server and set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. -======= -* If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. ->>>>>>> 7e3e9feca87aa77357de8112f4987a88b4c9b58e +* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. * The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. ## See also From c904b67d692b2dcd86e6a269052e903412bda020 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 25 Aug 2021 16:30:51 +0800 Subject: [PATCH 5/9] Update sql-statements/sql-statement-kill.md Co-authored-by: Mattias Jonsson --- sql-statements/sql-statement-kill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 8a15eec2fd976..bf33d31a83341 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -35,7 +35,7 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility * By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. -* The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. +* The `KILL TIDB` statement is a TiDB extension. This is different syntax than the mysql `KILL [CONNECTION|QUERY]` command and the mysql command line `ctrl-c` feature, but is safe to use in the same TiDB node. ## See also From e3d0201612d6d5220c8369d2122c7aaa158e2c18 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Wed, 25 Aug 2021 16:30:51 +0800 Subject: [PATCH 6/9] mysql_test: support alter table TABLE_NAME engine=xxxx Signed-off-by: Weizhen Wang --- sql-statements/sql-statement-kill.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 8a15eec2fd976..8bc7abe5e1ab3 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -34,8 +34,9 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility -* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. If you are certain that the session you are attempting to kill is on the same TiDB server, set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file. -* The `KILL TIDB` statement is a TiDB extension. You can kill the session without limitation. +* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. If you are certain that the session you are attempting to kill is on the same TiDB server. +* Only set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file if you are certain that clients always will be connected to the same TiDB node, since the default mysql client on ctrl-c will open a new connection to kill the currently running command, and if there are proxies in between, the new connection might be routed to a different TiDB node possibly killing a different session. +* The `KILL TIDB` statement is a TiDB extension. This is different syntax than the mysql `KILL [CONNECTION|QUERY]` command and the mysql command line `ctrl-c` feature, but is safe to use in the same TiDB node. ## See also From 33b608299ac9af4c3e3f233a6f486889100c8640 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 26 Aug 2021 11:14:15 +0800 Subject: [PATCH 7/9] Update sql-statements/sql-statement-kill.md Co-authored-by: Mattias Jonsson --- sql-statements/sql-statement-kill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 8bc7abe5e1ab3..684e73b436003 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -34,7 +34,7 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility -* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. If you are certain that the session you are attempting to kill is on the same TiDB server. +* By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. * Only set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file if you are certain that clients always will be connected to the same TiDB node, since the default mysql client on ctrl-c will open a new connection to kill the currently running command, and if there are proxies in between, the new connection might be routed to a different TiDB node possibly killing a different session. * The `KILL TIDB` statement is a TiDB extension. This is different syntax than the mysql `KILL [CONNECTION|QUERY]` command and the mysql command line `ctrl-c` feature, but is safe to use in the same TiDB node. From 5b7a60803adff65838d56c600e6f23997945d9a1 Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 26 Aug 2021 15:38:20 +0800 Subject: [PATCH 8/9] Update sql-statements/sql-statement-kill.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- sql-statements/sql-statement-kill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index 684e73b436003..aafcbf5b7f6c4 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -36,7 +36,7 @@ Query OK, 0 rows affected (0.00 sec) * By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. * Only set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file if you are certain that clients always will be connected to the same TiDB node, since the default mysql client on ctrl-c will open a new connection to kill the currently running command, and if there are proxies in between, the new connection might be routed to a different TiDB node possibly killing a different session. -* The `KILL TIDB` statement is a TiDB extension. This is different syntax than the mysql `KILL [CONNECTION|QUERY]` command and the mysql command line `ctrl-c` feature, but is safe to use in the same TiDB node. +* The `KILL TIDB` statement is a TiDB extension, which is a different syntax from the MySQL `KILL [CONNECTION|QUERY]` command and the MySQL command-line ctrl+c feature. It is safe to use `KILL TIDB` on the same TiDB node. ## See also From d65cf96c3f5d7942027ea38cb5590329b42b544d Mon Sep 17 00:00:00 2001 From: Weizhen Wang Date: Thu, 26 Aug 2021 15:38:43 +0800 Subject: [PATCH 9/9] Update sql-statements/sql-statement-kill.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- sql-statements/sql-statement-kill.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-kill.md b/sql-statements/sql-statement-kill.md index aafcbf5b7f6c4..99b153eb5483e 100644 --- a/sql-statements/sql-statement-kill.md +++ b/sql-statements/sql-statement-kill.md @@ -35,7 +35,7 @@ Query OK, 0 rows affected (0.00 sec) ## MySQL compatibility * By design, `KILL` is not compatible with MySQL by default. This helps prevent against a case of a connection being terminated on the wrong TiDB server, because it is common to place multiple TiDB servers behind a load balancer. -* Only set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file if you are certain that clients always will be connected to the same TiDB node, since the default mysql client on ctrl-c will open a new connection to kill the currently running command, and if there are proxies in between, the new connection might be routed to a different TiDB node possibly killing a different session. +* DO NOT set [`compatible-kill-query = true`](/tidb-configuration-file.md#compatible-kill-query) in your configuration file UNLESS you are certain that clients will be always connected to the same TiDB node. This is because pressing ctrl+c in the default MySQL client opens a new connection in which `KILL` is executed. If there are proxies in between, the new connection might be routed to a different TiDB node, which possibly kills a different session. * The `KILL TIDB` statement is a TiDB extension, which is a different syntax from the MySQL `KILL [CONNECTION|QUERY]` command and the MySQL command-line ctrl+c feature. It is safe to use `KILL TIDB` on the same TiDB node. ## See also