aaricpittman wrote on Friday, January 15, 2016:
Is there a particular reason there are tables where the primary key is not auto_increment?
aaricpittman wrote on Friday, January 15, 2016:
Is there a particular reason there are tables where the primary key is not auto_increment?
aethelwulffe wrote on Monday, January 18, 2016:
Simple answer is yes. InnoDB tables can have updates in middle of other stuff happening, resulting in “duplicate key” errors. I am pretty sure there are similar issues in other types. I believe there are bits of code in places that do the whole "MAX(id)+1 function within the code to reserve a row before anyone else grabs it due to issues like this. I think there are also some issues related to the layout engine there as well…but I am not absolutely sure.
Then again, maybe there is just some screwed up stuff in there too…