An interesting lesson learned today: A table's auto-increment value gets cached in MySQL. If you run ALTER TABLE table_name AUTO_INCREMENT = 1; and nothing seemingly happens, you have to reconnect the client.

I just encountered this phenomenon again today. Interestingly, I forgot all about this and this thread. I shrugged it off because it was a Friday afternoon and there were bigger fish to fry, and then stumbled upon this thread very randomly many hours later.

I couldn’t help but posting :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.