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

explain for connection shows incorrect empty result #21235

Closed
zz-jason opened this issue Nov 24, 2020 · 5 comments · Fixed by #21242
Closed

explain for connection shows incorrect empty result #21235

zz-jason opened this issue Nov 24, 2020 · 5 comments · Fixed by #21242
Assignees
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Milestone

Comments

@zz-jason
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

select connection_id(); -- which is 2199023255563 in my case
drop table if exists t1;
create table t1 (id int unsigned not null auto_increment primary key, t text, index(t(8)));
insert into t1 (t) values (md5('a')),(md5('b'));
select * from t1 where t='0cc175b9c0f1b6a831c399e269772661' or t='92eb5ffee6ae2fec3ad71c777531578f';

explain for connection 2199023255563; -- the id of the current conection

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

the execution plan of the current connection, not an empty result.

3. What did you see instead (Required)

TiDB(root@127.0.0.1:test) > explain for connection 2199023255563;
Query OK, 0 rows affected (0.00 sec)

4. What is your TiDB version? (Required)

TiDB(root@127.0.0.1:test) > select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-1606-gfbaab3ecb
Edition: Community
Git Commit Hash: fbaab3ecb60ad0524c22d3fb5532ebc00bc19d91
Git Branch: master
UTC Build Time: 2020-11-21 02:52:10
GoVersion: go1.15
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
@zz-jason zz-jason added type/bug The issue is confirmed as a bug. severity/critical labels Nov 24, 2020
@zz-jason
Copy link
Member Author

I found this when reproducing #21234

@SunRunAway
Copy link
Contributor

/assign @crazycs520

@lzmhhh123
Copy link
Contributor

If the SQL finished. The explain for connection will return empty. In otherwise, SQL not finish, the explain for is still working.

@SunRunAway
Copy link
Contributor

Could you describe this feature which is different from MySQL in the documentation? @crazycs520

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants