If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Serial Resets to MAX

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-12, 03:49
scopert scopert is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
Question Serial Resets to MAX

Hello,

I have a problem on Informix 11.5. Last day the serial field from one of the tables jumped from 3000 to MAX. Inserts are made by a trigger, but it is inserted with 0. Any ideea what can cause such a behavior ?
Reply With Quote
  #2 (permalink)  
Old 02-03-12, 05:46
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
Hi,

effectively, when you set 0 for the serial column at insert time, the value will be incremented by 1 at each INSERT BUT it is not forbidden to allocate a specific value to this column. If you want to insert with any numeric value compatible with the INTEGER data type, you can do it.

Some other user can perfectly insert this type of value with dbaccess or any client tool.

Unless this is a referenced bug I am not aware of, did you check PMRs at IBM ?

BTW, what do you mean by "MAX" ?
Eric
Reply With Quote
  #3 (permalink)  
Old 02-03-12, 06:29
scopert scopert is offline
Registered User
 
Join Date: Feb 2012
Posts: 2
Re

Hi,

By MAX I mean maxim value of integer(2147483647). I know someone else can set it, but there is nobody else doing this .
I've googled it for a few hours before writing this post and could not find anything regarding this strange behavior. Can you give me a link to the IBM location you are talking about ?

Tks,
Marius
Reply With Quote
  #4 (permalink)  
Old 02-05-12, 06:51
begooden-it begooden-it is offline
Registered User
 
Join Date: Sep 2011
Location: Pont l'Abbé, Brittany, France
Posts: 183
Hi,

supposedly you need a support contract at IBM to access PMR s now.
you can try there.

I have seen nothing relevant though. I have found an old forum discussion
including Alexey Sonkin, who was an Informix colleague, at Advanced Support.
He had access to IFMX source-code and his statement is clear: the only way
to increment a serial column value is to set 0 at the insert time, but you can allocate another value by simply setting another value by insert or update statement.

If you backup your logical logs, and if the phenomenon did not happen too long ago, why don't you try to parse onlog output and find such an insert or update on this table? Tricky but not impossible to do ;-)

In the meantime, I will check my release notes database to check about a possible bug.

What is your exact version number?

Cheers
Eric
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On