Re: General concurrency question
Posted in 2000
"Pentti Tietäväinen" wrote:
> Hello,
> The software is evolved from days when transaction logging was not
> implemented!
> It's not only to set up the "logging mode", you have to change code to
> handle cursors, etc..
> Anyway the base question remains. Is it quaranteed that the user A get's it
> DELETE done before user B's INSERT?
Sure. See it for yourself. Its quite a simple test.
1. Start up a couple of dbaccess sessions and add the code below to each.
2. Comment out the UNLOCK bit.
3. Hit <Enter> simultaneously. One session will succeed. The other session is
going to hang waiting for the lock to release.
4. Edit the code in the session that succeeded, adding the UNLOCK line at the
top. Hit <Enter>. You should find that the other session has succeeded, while
this one is now locked.
5. Keep doing 4 until you are satisfied :-)
Rudy