How to find locks in TiDB? My SQL is blocked. How to find the SQL that is blocking this transaction?

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

Original topic: 请问大佬怎么在tidb里面查找锁?我这个sql被阻塞了。怎么查找阻塞这个事务的sql

| username: tidb狂热爱好者

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Encountered Issues]
[Reproduction Path] What operations were performed to encounter the issue
[Issue Phenomenon and Impact]
image
UPDATE
ex_order
SET
STATUS = 5,
mtime = ‘2022-10-19 23:20:16.736’
WHERE
(
id IN (
1582753498020446208
)
AND STATUS IN (
3,
1,
0
)
);
[Attachments]

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: xfworld | Original post link

There is documentation, you can follow the documentation to see it. However, this lock should have been released, right? You still need to simulate it to see.

| username: tidb狂热爱好者 | Original post link

Thank you, I will take a look.

| username: system | Original post link

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