You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
alter table ... exchange partition ... does not forbid operations between clustered and nonclustered table #60805
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
> create table ta (pk int not null, ex int not null, primary key (pk, ex) nonclustered) partition by range(pk) (PARTITION p1 values less than (10));
> create table tb (pk int not null, ex int not null, primary key (pk, ex) clustered);
> insert into ta values(1, 2);
> alter table ta exchange partition p1 with table tb;
> admin check table ta;
2. What did you expect to see? (Required)
We should reject exchange partition when two tables have the different pk types (nonclustered vs clustered).
3. What did you see instead (Required)
> alter table ta exchange partition p1 with table tb; --- successed
Query OK, 0 rows affected
Time: 0.058s
> admin check table ta; -- but data corrupted
(1105, '[components/tidb_query_executors/src/table_scan_executor.rs:425]: Data is corrupted, missing data for NOT NULL column (offset = 0)')
Activity
3 remaining items
ddl, partition: fix exchange partition between clustered table with n…
bb7133 commentedon Apr 25, 2025
I checked all the test plans before we made
EXCHANGE PARTITIONGA...unfortunately clustered/non-clustered indexes are missing.@mjonss @Defined2014 Do you think this should be a major or critical bug?
bb7133 commentedon Apr 25, 2025
I'll set it to 'critical' due to the corrupted data.
ddl, partition: fix exchange partition between clustered table with n…
ddl, partition: fix exchange partition between clustered table with n…
ddl, partition: fix exchange partition between clustered table with n…