List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 20 2000 5:59pm
Subject:Re: auto_increment behavior at limit
View as plain text  
At 11:53 AM +0100 03-20-2000, gael_marziou@stripped wrote:
>Let's say I have an unsigned smallint primary key that is auto
>incremented, its range is between 0 and 65535.
>From time to time, I delete obsolete rows from my table so it is never
>full, but one day, I reach the 65535th row in my table, will next INSERT
>statement returns an error on primary key overflow or will it use holes in
>table to return a key lower than 65535?

An error will occur.  You can use a wider integer column type to avoid
this problem.

Paul DuBois, paul@stripped
auto_increment behavior at limitgael_marziou20 Mar
  • Re: auto_increment behavior at limitPaul DuBois20 Mar