Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- Use sysbench prepare 100w data
- Add index in
txn mode and use admin show ddl jobs check the row_count
mysql> SET GLOBAL tidb_enable_dist_task= off;set global tidb_ddl_enable_fast_reorg = off;
Query OK, 0 rows affected (0.02 sec)
mysql> alter table sbtest1 add index(id);
Query OK, 0 rows affected (13.02 sec)
mysql> admin show ddl jobs where job_id = 116;
+--------+---------+------------+-----------+----------------------+-----------+----------+-----------+----------------------------+----------------------------+----------+---------+----------+
| JOB_ID | DB_NAME | TABLE_NAME | JOB_TYPE | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME | START_TIME | END_TIME | STATE | COMMENTS |
+--------+---------+------------+-----------+----------------------+-----------+----------+-----------+----------------------------+----------------------------+----------+---------+----------+
| 116 | test | sbtest1 | add index | write reorganization | 2 | 110 | 0 | 2025-03-18 15:44:26.041000 | 2025-03-18 15:44:26.041000 | NULL | running | txn |
+--------+---------+------------+-----------+----------------------+-----------+----------+-----------+----------------------------+----------------------------+----------+---------+----------+
1 row in set (0.00 sec)
mysql> admin show ddl jobs where job_id = 116;
+--------+---------+------------+-----------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
| JOB_ID | DB_NAME | TABLE_NAME | JOB_TYPE | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME | START_TIME | END_TIME | STATE | COMMENTS |
+--------+---------+------------+-----------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
| 116 | test | sbtest1 | add index | public | 2 | 110 | 1000000 | 2025-03-18 15:44:26.041000 | 2025-03-18 15:44:26.041000 | 2025-03-18 15:44:39.042000 | synced | txn |
+--------+---------+------------+-----------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
1 row in set (0.00 sec)
2. What did you expect to see? (Required)
Show median values in ROW_COUNT when adding index.
3. What did you see instead (Required)
Only 0 and final rows can be seen in the whole process. I check the v7.5.6, it can display normally.
4. What is your TiDB version? (Required)
v8.5.1
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
txnmode and useadmin show ddl jobscheck therow_count2. What did you expect to see? (Required)
Show median values in
ROW_COUNTwhen adding index.3. What did you see instead (Required)
Only
0andfinal rowscan be seen in the whole process. I check the v7.5.6, it can display normally.4. What is your TiDB version? (Required)
v8.5.1