Subject Re: [ib-support] Deadlocks
Author Helen Borrie
At 10:12 AM 05-01-01 -0700, you wrote:

>One thing I would like is a document explaining how Interbase does locking.

IB doesn't do user-applied locking at all. It has MGA (multi-generational
architecture) and "locks" are managed internally according to isolation
level, conflict resolution setting and a couple of other conditions that
may apply.

There's a description of the process in the LangRef notes for SET
TRANSACTION. There is also quite a lot about it in the DevGuide under
Working with Transactions.

For a link to a white paper about MGA, see
www.interbase2000.org/ib_reallyuseful.htm.

>
>When using Sybase SQL Anywhere, it came with a section talking about the
>different lock types (shared, exclusive, ...) and told you which were applied
>when (on select, update, ...) so I could know just what kinds of locking
>problems I faced.

Well, there ya go, one less thing to worry about.

>In the case of Sybase the above works since the one
>program will get an exclusive lock on the table_name row in the id_table when
>the update is done. If another program tries to do the same thing, it will
>wait for the first lock to be released and then grab the lock for itself.

This is pessimistic locking - see my earlier post on how to do this.

H.


All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________