MySQL Forums
Forum List  »  InnoDB

Re: how to change innodb_autoinc_lock_mode = 0
Posted by: Peter Brawley
Date: April 09, 2021 10:34AM

Why are skipped values a problem?

If you need strict sequentiality, don't rely on auto_increment, it does not guarantee sequentiality--you'll need to program it eg wth a table of sequential numbers..

In 8, innodb_autoinc_lock_mode defaults to 2, see https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_autoinc_lock_mode. To chgange it to 0, put that setting in my.cnf.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: how to change innodb_autoinc_lock_mode = 0
656
April 09, 2021 10:34AM


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.