After inserting data, index_length is 0
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```
create database tibug_187_test;
set max_execution_time=100000;
CREATE TABLE t (a int, b int, c varchar(5), primary key(a), index idx(c)) PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN (6), PARTITION p1 VALUES LESS THAN (11), PARTITION p2 VALUES LESS THAN (16));
insert into t(a, b, c) values(1, 2, 'c'), (7, 3, 'd'), (12, 4, 'e');
select table_rows, avg_row_length, data_length, index_length from information_schema.tables where table_name='t' AND TABLE_SCHEMA='tibug_187_test';
```
### 2. What did you expect to see? (Required)
index_length is not zero.
### 3. What did you see instead (Required)
```
+------------+----------------+-------------+--------------+
| table_rows | avg_row_length | data_length | index_length |
+------------+----------------+-------------+--------------+
| 3 | 16 | 48 | 0 |
+------------+----------------+-------------+--------------+
1 row in set (0.06 sec)
```
### 4. What is your TiDB version? (Required)
Release Version: v9.0.0-alpha-75-gb6141ec
Edition: Community
Git Commit Hash: b6141ec589ed8e73176692dc982a210ad7cf070b
Git Branch: HEAD
UTC Build Time: 2025-01-09 06:06:54
GoVersion: go1.23.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Contributor guide
Assessment
This issue has not been assessed yet.