Skip to content

[Subtask]: Enforce explicit PARTITION restrictions for REPLACE #24953

Closed as duplicate

Description

@ck89119

Parent Issue

Parent issue: #24918

Detail of Subtask

Honor explicit PARTITION(...) restrictions for REPLACE statements.

Reference case from the parent issue:

create table t_pr(id int primary key, v int)
partition by range(id)(
  partition p0 values less than (10),
  partition p1 values less than (20)
);
insert into t_pr values (1,10),(11,110);

replace into t_pr partition(p0) values (15,150);

Expected MySQL-compatible behavior: fail because (15, 150) does not belong to the explicitly selected p0 partition.

MatrixOne currently inserts the row despite the explicit partition restriction.

Describe implementation you've considered

Propagate explicit partition selections through REPLACE planning/execution and validate every inserted replacement row against the selected partition set. Add tests for both insert-only and duplicate-key replacement paths.

Additional information

Parent context: #24918, comment section 6.

Activity

  1. added this to the MO-202606 milestone on Jun 12, 2026
  2. self-assigned this
    on Jun 12, 2026
  3. added
    severity/s0
    on Jun 12, 2026
  4. added
    severity/s1
    and removed
    severity/s0
    on Jun 30, 2026
  5. modified the milestones: MO-202606, MO-202607 on Jun 30, 2026
  6. added
    area/partition
    and removed
    severity/s1
    on Jul 15, 2026
  7. XuPeng-SH commented on Oct 29, 2026

    @XuPeng-SH
    Contributor

    Consolidated into #31084. The reproduction and acceptance requirements remain tracked there; closing this issue does not mean the problem has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/partitiondeferredkind/subtask

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions