Skip to content

value of INDEX_LENGTH column is incorrect with global index #54173

@Defined2014

Description

@Defined2014

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions