My Oracle Support Banner

Online Alter Table Shows ERROR 1062 (23000): Duplicate entry 'XXX' for key 'PRIMARY' (Doc ID 1593526.1)

Last updated on MARCH 25, 2020

Applies to:

MySQL Server - Version 5.6 and later
Information in this document applies to any platform.
Since MySQL 5.1, InnoDB is able to perform table maintenance operations using inplace algorithm (also known as "online alter"), which may be performed much faster and without blocked access.

Symptoms

ALTER TABLE command with "inplace" algorithm shows error message like:

ERROR 1062 (23000): Duplicate entry '2018853841' for key 'PRIMARY'

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.