Does anyone know of a way to simulate a range for an ID value in MySQL. Basically, I'm creating a database that will store the basic user information found in password files on various systems. I want the user's UID to be the primary key for this table, and I was wondering if there's a way to find a new unused UID by using auto_increment with a range so if it hits the max UID value, it just starts over at the start of the range looking for a free value.

I know Oracle can do something like that, but it looks like MySQL can't do that natively. Is there a way to hack it, or should I really be using code in the interface to find a new appropriate value?