Fixed Auto_increment and user deletion


This is not really a bug in xenforo but it happens due to xenforo doesn't clean user generated content properly after deleting a user.

The following behaviour was reported on the German board

The user reported after deletion of a user (it was the latest user who had already created content) the same user id was used again. Because of auto_increment this should not happen but there is one case this will happen.

MySQL seems to store the latest id for auto_increment in RAM and not on hard disk. After a server restart the id is set to MAX + 1. This happened in the reported case above. The server was restarted, a new user registered and got the same id as the previously deleted one and as a result all created threads, PC etc. were assigned to the new one.