exhange partition report error if has different SHARD_ROW_ID_BITS
- 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)
```sql
create table t1(a int, b int, c int) shard_row_id_bits = 4 partition by hash(a) partitions 10;
create table t2(a int, b int, c int);
alter table t1 exchange partition p1 with table t2;
```
### 2. What did you expect to see? (Required)
exchange partition success or classify on the document.
### 3. What did you see instead (Required)
```sql
[15:49:57]TiDB root:test> alter table t1 exchange partition p1 with table t2;
(1736, 'Tables have different definitions')
```
### 4. What is your TiDB version? (Required)
```sql
[15:51:37]TiDB root:test> select tidb_version();
+-----------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------+
| Release Version: v7.2.0-alpha |
| Edition: Community |
| Git Commit Hash: 94371a4eccb64a2354cce2105e5acdbee9842c5a |
| Git Branch: heads/refs/tags/v7.2.0-alpha |
| UTC Build Time: 2023-05-20 14:25:27 |
| GoVersion: go1.20.3 |
| Race Enabled: false |
| TiKV Min Version: 6.2.0-alpha |
| Check Table Before Drop: false |
| Store: unistore |
+-----------------------------------------------------------+
1 row in set
```
Contributor guide
Assessment
This issue has not been assessed yet.