Bug #89385 INSERT IGNORE DUPLICATE KEY

Submitted: 24 Jan 2018 15:14 Modified: 6 Oct 2020 13:05
Reporter: Victor Porton Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[24 Jan 2018 15:14] Victor Porton
Description:
I propose the following new syntax:

INSERT IGNORE DUPLICATE KEY ...

It would work as "INSERT IGNORE" but ignore ONLY "duplicate unique key" errors.

Rationale: INSERT IGNORE is most often used to ignore duplicate keys when inserting. Ignoring other errors is usually a bad side behavior. Usually non-duplicate-keys errors should NOT be ignored. So this feature is useful.

The same for REPLACE statement.

How to repeat:
Type

INSERT IGNORE DUPLICATE KEY ...

It won't work.
[6 Oct 2020 13:05] MySQL Verification Team
Hi Mr. Porton,

Thank you for your feature request.

However, you can efficiently workaround this problem with ........ ON DUPLICATE .... UPDATE and then set the assignment list conveniently.

Not a bug.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.