Question about auto-increment columns

2003-02-19 Thread Jedi/Sector One
Hello. I'm very new to MySQL (and SQL databases at large), so please apologize if I'm just missing an obvious point, or if it has already been discussed before. As I understand, auto-incremental columns (quite useful for primary indexes) are always incremented. Even if rows are deleted,

Re: Question about auto-increment columns

2003-02-19 Thread KH Chiu
I think you have no need to worry overflow if you use int type. You may have added assurance if you also define it as unsigned. I just listed the max. of different unsigned integer type for your reference tinyint 255 smallint 65535 mediumint 16777215 int 4294967295 bigint 18446744073709551615

Re: Question about auto-increment columns

2003-02-19 Thread Joel Rees
I'm very new to MySQL (and SQL databases at large), so please apologize if I'm just missing an obvious point, or if it has already been discussed before. Did a little search of MARC on auto-increment rollover, and it hit a thread from 1999. (This has been discussed many times before and since,

Re: Question about auto-increment columns

2003-02-19 Thread Jedi/Sector One
On Wed, Feb 19, 2003 at 06:35:07PM +0900, Joel Rees wrote: Did a little search of MARC on auto-increment rollover, and it hit a thread from 1999. (This has been discussed many times before and since, of course. My choice of search term wasn't very good, I guess.)

Re: Question about auto-increment columns

2003-02-19 Thread Jedi/Sector One
On Wed, Feb 19, 2003 at 10:43:41AM +0059, Jedi/Sector One wrote: Ok, except speculation on real life, there's no correct way to handle this. Self-correction : it looks like MySQL returns ER_DUP_ENTRY when an overflow occurs, even with InnoDB tables. Great :) -- __ /*- Frank DENIS

Re: Question about auto-increment columns

2003-02-19 Thread Stefan Hinz
Jedi, The behavior of the auto-increment mechanism is not defined if a user gives a negative value to the column or if the value becomes bigger than the maximum integer that can be stored in the specified integer type. Does it mean that MySQL databases will definitely stop working at a