List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 6 2003 9:38pm
Subject:Re: Autoincrement field rollover
View as plain text  
At 1:19 +0530 3/7/03, Jeethu Rao wrote:
>Hi,
>I'm using a mysql table to store small messages
>in a p2p messaging server.
>
>The primary key (message_id)is a UNSIGNED BIGINT,
>Which is supposed to be 64 bit, with autoincrement.
>The each row is deleted as soon as it is fetched
>By the client, and also after the expiry of a period
>(~30 days).
>
>64 bits does provide a large number, but there is a
>possibility that it won't be enough.
>My question is, does the autoincrement count rollover
>To zero normally, or will the rollover cause an error?

It doesn't roll over.  When you reach the upper limit of BIGINT UNSIGNED,
you'll get a duplicate key error.

>Or is there a better way to tackle the problem ?
>
>Thanks,
>
>Jeethu Rao

Thread
Autoincrement field rolloverJeethu Rao6 Mar
  • Re: Autoincrement field rolloverPaul DuBois6 Mar
Re: Autoincrement field rolloverAlec.Cawley7 Mar