I was hoping someone could shed some light into this for us. The PK field is not defined in the insert query, so it should use the next available auto increment value.
We have not attempted to create any test cases… but that is a good idea. I will try to setup a test instance and duplicate it.
I can give a little more background information. Our innodb_auto_increment_mode is the default, 1/traditional.
This seems limited to occurring on tables that we do batch inserts onto.
The table this is most often occurring on we have ~25 parallel processes running each doing batch inserts of 1000 rows per statement, which generally insert between 10,000 to 100,000 rows in total. The table is used more or less as a queue, so there will be brief periods of inserts like these, then have little activity.
We have a few other tables that we regularly do batch inserts on and we see the same problem there as well.