Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use pt-kill to kill TiDB connections #27932

Open
time-and-fate opened this issue Sep 9, 2021 · 8 comments · May be fixed by #30941
Open

Can't use pt-kill to kill TiDB connections #27932

time-and-fate opened this issue Sep 9, 2021 · 8 comments · May be fixed by #30941
Labels
component/parser good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility

Comments

@time-and-fate
Copy link
Member

Bug Report

Can't use pt-kill from percona-toolkit to kill TiDB connections.

Because it uses a kill '1' syntax, but tidb only supports kill 1.

1. Minimal reproduce step (Required)

Run a tidb locally, and run select sleep(50); in a connection.
Then run pt-kill --kill --user=root --match-command=Query --host=127.0.0.1 --port=4000 -v.

2. What did you expect to see? (Required)

Successfully kill the sleep(50) connection.

3. What did you see instead (Required)

In pt-kill's output:

Error killing 3: DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 8 near "'3'"  [for Statement "KILL ?" with ParamValues: 0=3] at /usr/bin/vendor_perl/pt-kill line 7046.

In tidb's output:

[WARN] [session.go:1330] ["parse SQL failed"] [conn=7] [error="line 1 column 8 near \"'3'\" "] [SQL="KILL '3'"]
[INFO] [conn.go:997] ["command dispatched failed"] [conn=7] [connInfo="id:7, addr:127.0.0.1:44316 status:10, collation:latin1_swedish_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="KILL '3'"] [txn_mode=OPTIMISTIC] [err="[parser:1064]You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 8 near \"'3'\" "]

4. What is your TiDB version? (Required)

master

@time-and-fate time-and-fate added the type/bug The issue is confirmed as a bug. label Sep 9, 2021
@time-and-fate
Copy link
Member Author

/type compatibility

@bb7133 bb7133 added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Sep 26, 2021
@znhh6018
Copy link
Contributor

/assign

@znhh6018
Copy link
Contributor

I'm careless about this issue ,I may need some time to learn about parse rules ,so let me unassign first, I will finish it later if no one does during this time.
/unassign

@wangggong
Copy link
Contributor

/assign

@znhh6018
Copy link
Contributor

znhh6018 commented Nov 6, 2021

@wangggong ,hey bro.Are you still working on this issue.I've finished and I want to PR. If you are almost done ,I will choose another issue.

@wangggong
Copy link
Contributor

If you have finished I just unassign it. Sorry for didn't finish it...

@wangggong wangggong removed their assignment Nov 6, 2021
@znhh6018
Copy link
Contributor

znhh6018 commented Nov 6, 2021

Thanks 'old' brother !!!

@znhh6018
Copy link
Contributor

znhh6018 commented Nov 7, 2021

MVR)T_2DIMUF~P $D 0P
@bb7133 Hi , bro .
What does the red line text mean, replace 'For' with 'TestVisitFrameBound' ?
and I haven't modify this part codes in my branch.

@znhh6018 znhh6018 linked a pull request Dec 22, 2021 that will close this issue
12 tasks
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/parser good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug. type/compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants