Cannot kill the currently executing SQL

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

Original topic: kill不掉正在执行的sql

| username: TiDBer_Y2d2kiJh

【TiDB Usage Environment】Production Environment
【TiDB Version】v5.4.0
【Reproduction Path】A SQL statement took a long time to execute, and it continued to execute even after being killed.
【Encountered Problem: Problem Phenomenon and Impact】
【Resource Configuration】
【Attachment: Screenshot/Log/Monitoring】

| username: 孤君888 | Original post link

Is SQL DDL? Or query SQL? I have encountered situations in MySQL where DDL cannot be killed, possibly because high IO usage caused it to hang.

| username: TiDBer_Y2d2kiJh | Original post link

It is a query statement.

| username: tidb菜鸟一只 | Original post link

Take a look at the show process list.

| username: 裤衩儿飞上天 | Original post link

Log in to the TiDB server where the session is located and execute kill tidb XXXX;

| username: 啦啦啦啦啦 | Original post link

Before version 6.1.0, the default required using the kill tidb syntax.

| username: xingzhenxiang | Original post link

KILL TIDB threadid

| username: TiDBer_Y2d2kiJh | Original post link

Thank you all, kill tidb xxxx; worked.