Skip to content

error still returns when updating record to the unmatched partition using update ignore ... #50128

@lcwangchao

Description

@lcwangchao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

> CREATE TABLE tp (id INT) PARTITION BY RANGE (id) ( PARTITION p0 VALUES LESS THAN (100), PARTITION p1 VALUES LESS THAN (200));
> insert tp partition(p0) values(1);
> update ignore tp partition(p0) set id=101;

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

In MySQL 8.0

mysql> update ignore tp partition(p0) set id=101;
Query OK, 0 rows affected, 1 warning (0.01 sec)
Rows matched: 1  Changed: 0  Warnings: 1

mysql> show warnings;
+---------+------+--------------------------------------------------+
| Level   | Code | Message                                          |
+---------+------+--------------------------------------------------+
| Warning | 1748 | Found a row not matching the given partition set |
+---------+------+--------------------------------------------------+
1 row in set (0.01 sec)

3. What did you see instead (Required)

mysql> update ignore tp partition(p0) set id=101;
ERROR 1748 (HY000): Found a row not matching the given partition set

4. What is your TiDB version? (Required)

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.3severity/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