One MySQL Table keeps losing auto-increment after restart
Try inserting dummy ID

select max(ID) fromtable1into @IDmax;
set @IDmax = @IDmax + 1;
insert intotable1setID= @IDmax;
delete fromtable1whereID= @IDmax;

This bug usually when trying to insert a duplicated value on a key.