TiDB query statement (drop/alter table) is completely stuck, kill query cannot terminate it

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB query 语句(drop /alter table) 全卡住了, kill query 也无法结束

| username: Jarry

We have a TiDB V4.0.16 cluster. Previously, we added an index to a certain table. Because the table is very large, the process of adding the index took a very long time. During this period, I decided I didn’t want to add the index anymore and tried to end the process by pressing Ctrl+C, but it wouldn’t stop. Then I tried to drop the table, but it got stuck. I also tried to drop other tables, but they also got stuck. Is there any way to kill this query?

  1. Select * from information_schema.cluster_processlist to find the ID.
  2. Kill tidb query ID;
| username: tidb菜鸟一只 | Original post link


| username: Jarry | Original post link

You’re no TiDB newbie, you’re a pro!!!
The problem is solved, thank you very much!!!

| username: zhanggame1 | Original post link

In TiDB, pressing Ctrl + C cannot stop DDL operations; you need to use ADMIN CANCEL DDL JOBS.

| username: linnana | Original post link

If MySQL encounters this scenario and can’t be killed, it seems you can only wait.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.