pingcap/tidb

`admin show ddl jobs` has display problem with multi schema change

Opened this issue · 1 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Sysbench prepare 1 million rows data, and modify two column in one sql, after it finish, execute admin show ddl jobs

mysql> alter table sbtest1 modify column k char(30), modify column pad varchar(70);
Query OK, 0 rows affected (1 min 17.93 sec)

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

The ROW_COUNT column of two sub-job all display 1000000

3. What did you see instead (Required)

The ROW_COUNT column of two sub-job display 1843062 and 1000000, and the comments column of second sub-job is empty

mysql> admin show ddl jobs 1;
+--------+-------------+------------+---------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
| JOB_ID | DB_NAME     | TABLE_NAME | JOB_TYPE                        | SCHEMA_STATE | SCHEMA_ID | TABLE_ID | ROW_COUNT | CREATE_TIME                | START_TIME                 | END_TIME                   | STATE  | COMMENTS |
+--------+-------------+------------+---------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
|    182 | sysbench_1m | sbtest1    | alter table multi-schema change | none         |       160 |      164 |         0 | 2024-11-26 05:12:45.962000 | 2024-11-26 05:12:45.962000 | 2024-11-26 05:14:03.861000 | synced | txn      |
|    182 | sysbench_1m | sbtest1    | modify column /* subjob */      | public       |       160 |      164 |   1843062 | 2024-11-26 05:12:45.962000 | 2024-11-26 05:12:45.962000 | 2024-11-26 05:14:03.861000 | done   | txn      |
|    182 | sysbench_1m | sbtest1    | modify column /* subjob */      | public       |       160 |      164 |   1000000 | 2024-11-26 05:12:45.962000 | 2024-11-26 05:13:42.611000 | 2024-11-26 05:14:03.861000 | done   |          |
+--------+-------------+------------+---------------------------------+--------------+-----------+----------+-----------+----------------------------+----------------------------+----------------------------+--------+----------+
3 rows in set (0.02 sec)

4. What is your TiDB version? (Required)

master

/report customer