Skip to content

exchange partition incorrectly report Found a row that does not match the partition #59534

@djshow832

Description

@djshow832

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE di_tidb_wzp_test (a1 int(11) not null,a2 int(11) not null,a3 date default null, primary key (`a1`,`a2`)) partition by range columns(`a1`,`a2`)(partition `p10` values less than (10,10),partition `p20` values less than (20,20),partition `pmax` values less than (maxvalue,maxvalue));
insert into di_tidb_wzp_test values(5,10,null);
insert into di_tidb_wzp_test values(10,4,null);
CREATE TABLE di_tidb_wzp_test_np (a1 int(11) not null,a2 int(11) not null,a3 date default null, primary key (`a1`,`a2`));
insert into di_tidb_wzp_test_np values(10,4,null);
insert into di_tidb_wzp_test_np values(4,10,null);
alter table di_tidb_wzp_test exchange partition p10 with table di_tidb_wzp_test_np;

2. What did you expect to see? (Required)

alter table succeeds.

3. What did you see instead (Required)

mysql> alter table di_tidb_wzp_test exchange partition p10 with table di_tidb_wzp_test_np;
ERROR 1737 (HY000): Found a row that does not match the partition

4. What is your TiDB version? (Required)

v8.5.0

Metadata

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.report/customerCustomers have encountered this bug.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions