Subject | RE: [firebird-support] Triggers/Stored procs and Locks |
---|---|
Author | Alan McDonald |
Post date | 2006-06-22T06:19:26Z |
> B) Locking of records. As previously explained with transactionUpdates will lock the record from further updates until committed.
> and data stored on pages and then commited to database if all is fine etc.
> i) When a record is locked thanks to my transaction. Is it a
> row level (record) or page level (all active ones on the cache
> page) lock ?
> ii) What will lock the record ? only updates , inserts and
> deletes or does normal selects also lock records ?
Inserts will not be visible by previous or susequent transactions until the
trasn in question is committed (no locks involved)
Deletes will still be visible to other (previously open) transactions until
the trans in question is committed and the previously opened transactions
are also committed (refreshed). no locks unless you are attempting to delete
a record which has been updated by a previous transaction which is not yet
committed....i.e the previous trans has registered a non-benign interest in
the record in question.
golden rule: if you are trying to work out what you should/should not be
able to see... Q:is your view on the data consistent. you will not be able
to see an inconsistent view of data with FB.
Alan
> iii) If I only start a transaction and then commit it
> immediately afterwards with absolutely nothing between it. Does a
> database lock appear at all ?
>
>
> Thanks in Advance for all your help and patience
>
>
> Johannes Pretorius