Re: Cursor Stability Isolation Level
Posted in 1997
Topics: Transactions, Locking & Isolation
Bill Ennis wrote: > > Reading from the Informix Guide to SQL:Tutorial version 7.2 p.7-14 > "When Cursor Stability is in effect, the database server places a lock > on the latest row fetched. It places a shared lock for an ordinary cursor > and a promotable lock for an update cursor. Only one row is locked at a time; > that is, each time the row is fetched, the lock on the previous row is released > (unless the row is updated, in which case the lock holds until the end of the > transaction). Cursor Stability ensures that a row does not change while the > program examines it." > > I have a program that creates a normal cursor (not an update cursor). When > I set an isolation level of Cursor Stability and fetch a row I do NOT > see a shared lock on the fetched row! > > Now if I fetch the row from within a transaction I do see a shared lock > on the row. In the definition given in he manual there is no mention of > a transaction being available at the time of the fetch. Was this just > an oversight? Is the behavior I'm seeing a problem? Judging from the > sentence "Cursor Stability ensures that a row does not change while the > program examines it." I would think it is a problem. I haven't got books in front of me to quote from, but if you don't use transactions, the only isolation level available is DIRTY READ. AFAIK. Cheers, -- Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+