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

kill statement can't interrupt subquery #11100

Closed
tiancaiamao opened this issue Jul 5, 2019 · 2 comments
Closed

kill statement can't interrupt subquery #11100

tiancaiamao opened this issue Jul 5, 2019 · 2 comments
Assignees
Labels
type/bug The issue is confirmed as a bug.

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

As I've mentioned in #10959, the MAX_EXECUTION_TIME hint can only kill queries in execute phase, kill statement has the same problem.

This query can be killed

select 1,  sleep(5);

while this cannot:

select 1,  (select sleep(5));
  1. What did you expect to see?

kill tidb xxx should interrupt this query select 1, (select sleep(5));

  1. What did you see instead?

The query is not interrupted

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

git hash 21d2590

@tiancaiamao tiancaiamao added the type/bug The issue is confirmed as a bug. label Jul 5, 2019
@tiancaiamao tiancaiamao self-assigned this Jul 5, 2019
@tiancaiamao tiancaiamao changed the title kill statement can interrupt subquery kill statement can't interrupt subquery Jul 5, 2019
@wjhuang2016
Copy link
Member

related to #11905

@ghost
Copy link

ghost commented Jul 15, 2020

I checked this bug against master, and it's fixed:

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-769-g2024e4463
Edition: Community
Git Commit Hash: 2024e44636f2fb9798982a1cc0ec22176e07f5c1
Git Branch: master
UTC Build Time: 2020-07-14 09:26:07
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

mysql> select 1,  sleep(5);
+---+----------+
| 1 | sleep(5) |
+---+----------+
| 1 |        0 |
+---+----------+
1 row in set (5.00 sec)

mysql> select 1,  sleep(10); <-- this one was killed, hence sleep returning 1
+---+-----------+
| 1 | sleep(10) |
+---+-----------+
| 1 |         1 |
+---+-----------+
1 row in set (3.86 sec)

I am going to close this issue now.

@ghost ghost closed this as completed Jul 15, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants