Subject | Re: [Firebird-Architect] Read Committed No Wait transactions |
---|---|
Author | Ann W. Harrison |
Post date | 2004-09-21T17:39:41Z |
At 12:36 PM 9/21/2004, Jonathan Neve wrote:
encounters a record that has been written (inserted, updated, or deleted)
and not committed it will get an immediate deadlock error, whether
the transaction that did the write is read committed, snapshot,
wait, or no wait.
uncommitted record.
transactions.
In window 1:
SQL> set transaction no wait read committed;
Commit current transaction (y/n)?y
Committing.
SQL> insert into t1 values (4);
SQL>
In window 2:
SQL> set transaction no wait read committed;
Commit current transaction (y/n)?y
Committing.
SQL> select * from t1;
F1
============
1
2
3
Statement failed, SQLCODE = -901
lock conflict on no wait transaction
-deadlock
SQL>
these examples don't use it.
Regards,
Ann
> >The effect is to cause the transaction to fail withYes, I'm quite certain that if a read committed no wait transaction
> >an apparent deadlock if there are any uncommitted
> >records in the data set examined.
> >
> >
>Are you sure this isn't the behaviour when combined with another TR
>option?
encounters a record that has been written (inserted, updated, or deleted)
and not committed it will get an immediate deadlock error, whether
the transaction that did the write is read committed, snapshot,
wait, or no wait.
> In my experience, the effect is rather to fail immediatelyIt demonstrably fails with ISQL when attempting to read an
>(without waiting) if any other transaction tries to UPDATE a record
>that's already been updated in a different transaction.
uncommitted record.
>I don't understand how you can get such an effect. Isn't this behaviourHere are two ISQL sessions, both using read committed, no wait
>specific to a combination with another option?
transactions.
In window 1:
SQL> set transaction no wait read committed;
Commit current transaction (y/n)?y
Committing.
SQL> insert into t1 values (4);
SQL>
In window 2:
SQL> set transaction no wait read committed;
Commit current transaction (y/n)?y
Committing.
SQL> select * from t1;
F1
============
1
2
3
Statement failed, SQLCODE = -901
lock conflict on no wait transaction
-deadlock
SQL>
> Isn't there an optionNo or rather yes, there is an explicit record lock in FB1.5, but
>that locks the record for both read and write access?
these examples don't use it.
Regards,
Ann