I keep this little chart tacked to my wall:
# BIGINT UNSIGNED = 8 Byte = FFFFFFFFFFFFFFFF = 18446744073709551615
# INT UNSIGNED = 4 Byte = FFFFFFFF = 4294967295
# MEDIUMINT UNSIGNED = 3 Byte = FFFFFF = 16777215
# SMALLINT UNSIGNED = 2 Byte = FFFF = 65535
# TINYINT UNSIGNED = 1 Byte = FF = 255
# BIGINT SIGNED = -9223372036854775808 to 9223372036854775807
# INT SIGNED = -2147483648 to 2147483647
# MEDIUMINT SIGNED = -8388608 to 8388607
# SMALLINT SIGNED = -32768 to 32767
# TINYINT SIGNED = -128 to 127
# TINYTEXT = 255
# TEXT = 65535
# MEDIUMTEXT = 16777215
# LONGTEXT = 4294967295
> -----Original Message-----
> From: Daniel Kasak [mailto:dkasak@stripped]
> Sent: Tuesday, June 13, 2006 9:52 PM
> To: wolverine my; mysql@stripped
> Subject: Re: Reset (or Defrag) the AUTO_INCREMENT columns
> wolverine my wrote:
> > Yes, I agree on what you have described.
> > However, what should we do when the value is reaching the
> maximum? To
> > alter the data type to a bigger one?
> Yes - convert the data type to a larger one.
> If you've got a mediumint, for example, you can convert it to an
> unsigned mediumint. The 'unsigned' bit means that the field
> won't store
> negative values - this gives you twice the positive numbers you can
> store. Otherwise if you're already using an unsigned data type, then
> just go up to the next data type ( eg mediumint to int, or int to
> bigint, etc ).