ddl job of the exchange partition is incorrect.
- 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)
1. Execute the following sql
```sql
create database `partition_table`;
create table partition_table.t1 (a int primary key) PARTITION BY RANGE ( a ) ( PARTITION p0 VALUES LESS THAN (6),PARTITION p1 VALUES LESS THAN (11),PARTITION p2 VALUES LESS THAN (21), PARTITION p3 VALUES LESS THAN (30));
create database `partition_table2`;
create table partition_table2.t2 (a int primary key);
use `partition_table2`
ALTER TABLE partition_table.t1 EXCHANGE PARTITION p3 WITH TABLE t2;
```
2. Log the DDL job info
### 2. What did you expect to see? (Required)
Get the correct job info
### 3. What did you see instead (Required)
```json
{
"id": 112,
"type": 42,
"schema_id": 106,
"table_id": 108,
"schema_name": "partition_table2",
"table_name": "t1",
"state": 4,
...
}
```
However, t1 belongs to partition_table before and after ddl execution.
### 4. What is your TiDB version? (Required)
Contributor guide
Assessment
This issue has not been assessed yet.