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 ?
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 ?
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 ?
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.