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

INFORMATION_SCHEMA.CLUSTER_STATEMENTS_SUMMARY: Abnormal behavior when logging statement using primary key index #37066

Closed
c4pt0r opened this issue Aug 12, 2022 · 1 comment · Fixed by #37073
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@c4pt0r
Copy link
Member

c4pt0r commented Aug 12, 2022

Bug Report

If a statement uses a primary key index, the primary key index is not recorded in the IndexName column of CLUSTER_STATEMENTS_SUMMARY table

1. Minimal reproduce step (Required)

create table tt(a varchar(255) primary key);
insert into tt values("a");
select * from tt where a = "a";
select `INDEX_NAMES` from INFORMATION_SCHEMA.CLUSTER_STATEMENTS_SUMMARY where digest_text = 'select * from `tt` where `a` = ?';

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

INDEX_NAMES
----------
tt:PRIMARY

3. What did you see instead (Required)

INDEX_NAMES
----------
<null>

4. What is your TiDB version? (Required)

tidb_version() | Release Version: v6.1.0
Edition: Community
Git Commit Hash: 1a89decdb192cbdce6a7b0020d71128bc964d30f
Git Branch: heads/refs/tags/v6.1.0
UTC Build Time: 2022-06-05 05:09:33
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
@c4pt0r c4pt0r added the type/bug This issue is a bug. label Aug 12, 2022
@CbcWestwolf
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants