Re: Informix memory errors, 'serial' number errors
Posted in 1993
In article <1qjqqsINNpom@emory.mathcs.emory.edu> obelix.informix.com!johnl@emory.mathcs.emory.edu (Jonathan Leffler) writes: > >}From: uunet!cleveland.Freenet.Edu!ak132 (Felipe Barousse) >} >}On other issues, has any of you experienced problems with the 'serial' data >}type on Informix. It seems to us that the supposed 'serial', never repeating; >}incremental numbers are not working properly, they DO repeat. Has this >}happened to someone else ? Please tell your story and how you solved it. >}The configuration is the same described above. > >Serial Numbers: do you have a unique index on the serial column? > >There are two ways you can get duplicate values into a serial column. > >(1) You don't have a unique index on it (and an index isn't put there >automatically unless you use the schema editor to create the table), >you do INSERT INTO TableA VALUES (100, ...) twice. > >(2) You cycle past 2147483647 and the next number is 1. This doesn't >normally happen -- if you inserted 1 row a second for 30+ years, you'd >do it, but not before. Actually, you don't have to cycle through the entire 2147483647 numbers to get back to 1. If you were only up to 100, but you did "INSERT INTO tab1 VALUES (50000, ...)", the next time you inserted one using 0, it would become 50001. So if somehow your data was corrupted and you inserted a value 2147483640, it wouldn't be very long before you cycled back to 1. June ----------------------------------------------------------------- June Tong Informix Software, Inc. Regency Support 4100 Bohannon Drive (415) 926-6433 Menlo Park, CA 94025 e-mail: junet@informix.com or uunet!infmx!junet -----------------------------------------------------------------