Re: Bug while fetching rows in OnLine 5.0
Posted in 1993
}From: uunet!cocamrd.mel.cocam.oz.au!sms (Steve Szalla) }Subject: Bug while fetching rows in OnLine 5.0 }Date: 10 Mar 93 01:43:25 GMT }X-Informix-List-Id: <news.2807> }There seems to be a bug in OnLine that affects whether rows can be }fetched depending on the isolation level used. We have an ESQL/C }program which opens a cursor and starts fetching rows. If a fetch }fails because the row is locked, the program changes isolation level }from COMMITTED READ to DIRTY READ and tries the fetch again. After }fetching the locked row, we change the isolation level back to }COMMITTED READ and continue. The reason we do this is that we do }not want to be held up by locked rows, but we do want to be able to }identify phantom rows. }The problem is that if there are two locked rows and they are either }adjacent or adjacent but one, the program is forced to change }isolation levels for the first row but not the second. In other }words, the second locked row is being successfully fetched with }an isolation level of COMMITTED READ, which should not be possible. }It does not make any difference if the rows have the same home page }or not. When rows that are more than two rows apart are locked, the }program behaves as expected and changes to DIRTY READ for both locked }rows. }My questions are: } }1. Is the ability to switch between isolation levels while a } cursor is open and change the effect of fetches expected and } supported behaviour? You can certainly switch levels during a transaction, but while a cursor is open? I doubt if it was intended to work. }2. Is this a known bug? If so, what version of OnLine is it fixed } in? If not, when will it be fixed? Is there a work-around? Is it even a bug? I think that what'll be happening is that the back-end is returning two rows of data in a single message, and therefore both are read at dirty read isolation, perfectly correctly. Since I doubt if the behaviour is expected to work, I would not expect anyone in Informix to get worked up about it. However, I am not expressing an official Informix view. }The relevant versions are: OnLine 5.00uC3, ESQL 5.00.UC2 on SunOS. Thanks for this info -- it makes answering questions so much easier. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>