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

value of INDEX_LENGTH column is incorrect with global index #54173

Closed
Defined2014 opened this issue Jun 24, 2024 · 1 comment · Fixed by #54176
Closed

value of INDEX_LENGTH column is incorrect with global index #54173

Defined2014 opened this issue Jun 24, 2024 · 1 comment · Fixed by #54176
Assignees
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int, b int, c int) partition by hash(c) partitions 4;
alter table t add unique index b(b);
insert into t values (1,1,1);
analyze table t;
select * from information_schema.partitions where table_name like 't';

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

mysql> select partition_name, index_length from information_schema.partitions where table_name like 't';
+----------------+--------------+
| partition_name | index_length |
+----------------+--------------+
| p0             |            0 |
| p1             |            0 |
| p2             |            0 |
| p3             |            0 |
+----------------+--------------+
4 rows in set (0.01 sec)

3. What did you see instead (Required)

mysql> select partition_name, index_length from information_schema.partitions where table_name like 't';
+----------------+--------------+
| partition_name | index_length |
+----------------+--------------+
| p0             |            0 |
| p1             |            8 |
| p2             |            0 |
| p3             |            0 |
+----------------+--------------+
4 rows in set (0.01 sec)

4. What is your TiDB version? (Required)

@Defined2014 Defined2014 added type/bug The issue is confirmed as a bug. severity/minor labels Jun 24, 2024
@Defined2014 Defined2014 self-assigned this Jun 24, 2024
@Defined2014 Defined2014 added component/tablepartition This issue is related to Table Partition of TiDB. sig/sql-infra SIG: SQL Infra labels Jun 24, 2024
@Defined2014
Copy link
Contributor Author

Defined2014 commented Jun 24, 2024

@mjonss Do you think this was expected or a bug? Should we change it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tablepartition This issue is related to Table Partition of TiDB. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant