My Oracle Support Banner

Error Duplicate Entry ' ' For Key 'PRIMARY' on Auto-Increment Primary Key when changing AUTO_INCREMENT_INCREMENT (Doc ID 2498911.1)

Last updated on APRIL 15, 2021

Applies to:

MySQL Server - Version 5.7 and later
Information in this document applies to any platform.


 When changing AUTO_INCREMENT_INCREMENT in one of parallel sessions, MySQL starts randomly throwing errors when performing inserts for the auto increment primary key field:



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

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