steamPunk;11014787 wrote:
Is there any risk of the auto-increment being reset ?
Why are you even asking this question? If you're worried that the AI would collied with rows that weren't deleted, you don't have to. Optimize table is recommended to be used after lots of rows have been deleted, thus it's safe to use with the remaining rows, wether the would reuse deleted values or not.
If you're depending on the AI being in some particular order, you are doing something very wrong. The only thing you should expect to get from the AI is a unique integer for each and every row. They did indeed implement it so that it keeps giving increasing values, but that's due to simplicity of implementation along with the fact that the actual values doesn't matter at all. Had it been easier to implement unique values that were completely random, they would be.
But, as far as the question in this thread goes, brad's correct as far as I know.