pingcap / pingcap/tidb

ADMIN SHOW DDL JOBS changes table for EXCHANGE PARTITION

Open
#45,823 0 comments 0 reactions 1 assignee Claimed by @mjonss View on GitHub
severity/moderate sig/sql-infra 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)

```
tidb1> create table t (a int, b varchar(255));
tidb1> create table tp (a int, b varchar(255)) partition by range (a) (partition p0 values less than (1000000), partition p1 values less than (2000000));
tidb2> begin;
tidb2> insert into t values (1,1);
tidb1> alter table tp exchange partition p0 with table t; -- will wait for tidb2
tidb3> admin show ddl jobs; -- shows the 'exchange partition' with table name 't'
tidb4> begin;
tidb4> insert into t values (2,2);
tidb2> commit;
tidb3> admin show ddl jobs; -- shows the 'exchange partition' with table name 'tp'
```

### 2. What did you expect to see? (Required)
The table name to be the same for the `admin show ddl jobs` for the same job_id.

### 3. What did you see instead (Required)
The table name changed from the non partitioned table `t` to the partitioned table `tp`.

### 4. What is your TiDB version? (Required)

```
tidb_version(): Release Version: v7.4.0-alpha
Edition: Community
Git Commit Hash: d43359a5570590d4892332ad0ad4b152cb12b3e1
Git Branch: master
UTC Build Time: 2023-08-04 08:22:05
GoVersion: go1.20.7
Race Enabled: false
Check Table Before Drop: false
Store: unistore
```

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.