MySQL Forums
Forum List  »  Newbie

Re: Auto Increment Primary Key - Reuse of Primary Key?
Posted by: Peter Brawley
Date: March 24, 2016 10:22AM

Generally auto_increment does not re-use values, with a crucial exception: since its inception, InnoDB had had this serious bug: on a server restart, the INNODB auto_increment counter resets to the next available value, so higher deleted key values will be re-used, and that can create foreign key mayhem.

You don't mention a server restart between those two client inserts. Was there?
If not, let's see the SQL that created the anomaly.

Options: ReplyQuote

Written By
Re: Auto Increment Primary Key - Reuse of Primary Key?
March 24, 2016 10:22AM

Sorry, you can't reply to this topic. It has been closed.

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.