pingcap / pingcap/tidb

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

Open
#57,720 1 comment 1 reaction 0 assignees View on GitHub
affects-7.5 component/ddl report/customer severity/moderate type/bug
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)
Sysbench prepare 1 million rows data, and modify two column in one sql, after it finish, execute `admin show ddl jobs`
```sql
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.