lock modes, isolation levels, and scanning
Posted in 1998
I am not sure how to implement the following scenario, or if
it is in fact possible (using IUS 9.14)
Assume transaction 1 modifies a row in a table :
delete from onsale where perf_id=1 and admit_id=1
(this could be any operation that places a promotable or exclusive lock
on the row)
Now, assume that transaction 2 (also an update type transaction) wants
to scan the table with something like
select * from onsale where perf_id=1
The question is, what should happen when transaction 2 encounters the
row that transaction one has locked?
What I need is for it to just skip over it (and any such locked rows),
and return the next matched row from the set.
The default behavior is that the query completely fails, giving some message
about not being able to position within the table.
I see the lock modes WAIT and NOT WAIT, but I think I need a different
alternative like - SKIP or something like that.
Am I trying to do the impossible, or do I just need a little help?
============================================================
Roger S. Reynolds
email: rsr@rogerware.com rsr@softix.com
Web: http://www.rogerware.com