Subject | Re: [firebird-support] READ ONLY READ COMMITTED and consistency |
---|---|
Author | Michael Ludwig |
Post date | 2010-05-16T14:58:35Z |
Alan McDonald schrieb am 17.05.2010 um 00:32:48 (+1000):
problem; it should be about READ COMMITTED only.
Because for a READ COMMITTED transaction, it is not true. My SELECT is
only one of possibly several statements inside a transaction, and by
specifying an isolation level of READ COMMITTED I accept to see new
record versions of subsequently committed transactions:
SQL> commit;
SQL> SET TRANSACTION READ COMMITTED;
SQL> select count(*) from TTT;
COUNT
============
3
SQL> select count(*) from TTT;
COUNT
============
4
This is, of course, possible because my isolation is only READ
COMMITTED, and in another session I inserted a record into TTT.
definitely yes.
--
Michael Ludwig
> > In a transaction configured with READ ONLY READ COMMITTED, is itIt has occurred to me that READ ONLY should be irrelevant to this
> > possible to see just part of a commit?
problem; it should be about READ COMMITTED only.
> > Is it possible for my RO/RC transaction to see one of the twoI think you mean SELECT *statement*, not *transaction*?
> > rows affected by the intervening UPDATE in its state before the
> > intervening COMMIT, and the other in its state after that COMMIT?
>
> No - you select transaction is started before the update and will only
> see data committed to that point. It will never see the updated from a
> subsequent update until it commits and re-reads
Because for a READ COMMITTED transaction, it is not true. My SELECT is
only one of possibly several statements inside a transaction, and by
specifying an isolation level of READ COMMITTED I accept to see new
record versions of subsequently committed transactions:
SQL> commit;
SQL> SET TRANSACTION READ COMMITTED;
SQL> select count(*) from TTT;
COUNT
============
3
SQL> select count(*) from TTT;
COUNT
============
4
This is, of course, possible because my isolation is only READ
COMMITTED, and in another session I inserted a record into TTT.
> > This would not, if I understand correctly, constitute a DIRTY READFor the statement, probably not. But for a READ COMMITTED transaction,
> > (which Firebird does not allow), as both versions are committed,
> > just not by the same transaction.
>
> Subsequent commits are not visible
definitely yes.
--
Michael Ludwig