Skip to content

Improve skip_duplicates #388

@dimitri-yatsenko

Description

@dimitri-yatsenko

This is perhaps a more elegant alternative solution to that in #382 / #383.

MySQL does not provide a duplicate-specific ignore. But it does have ON DUPLICATE KEY UPDATE. It can be co-opted to play the role of the ON DUPLICATE KEY IGNORE.

I propose to replace the logic implemented in #383 by appending ON DUPLICATE KEY UPDATE id1 = id1 where id1 is the first attribute of the primary key. This leaves the duplicate values unchanged and quietly ignores them while inserting all the good entries.

Metadata

Metadata

Labels

enhancementIndicates new improvements

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions