Insert but Don't Commit MySql
A skipped id can happen in several situation.  Keep in mind that an INSERT generally starts by allocating all the ids that it may need.  Here's a few examples where AUTO_INCREMENT ids are 'burned':

BEGIN; INSERT; ROLLBACK;

INSERT IGNORE -- and some of them are ignored due to dup key

REPLACE -- DELETE, then INSERT


The one I dislike is:

SET autocommit = 0;
INSERT
forget to ever do the COMMIT


For that reason, I avoid autocommit=0.

In a multi-master (including Galera) setup, with auto_increment_increment > 1, the INSERTs on one master skip values.