Subject | RE: [firebird-support] READ ONLY READ COMMITTED and consistency |
---|---|
Author | Alan McDonald |
Post date | 2010-05-16T14:32:48Z |
> In a transaction configured with READ ONLY READ COMMITTED, is itNo - you select transaction is started before the update and will only see
> possible to see just part of a commit?
>
> Imagine a rather long-running SELECT and an intervening UPDATE changing
> two rows which will both be part of our SELECT's result set:
>
> SET TRANSACTION READ ONLY READ COMMITTED;
> SELECT a FROM MyTable WHERE <going to take a while>;
>
> While the SELECT is fetching data, in another transaction:
>
> UPDATE MyTable SET a = :x WHERE <lightning-fast index lookup>;
> -- affecting two rows in MyTable
> COMMIT;
>
> My SELECT is still running and fetching data at this point.
>
> Is it possible for my RO/RC transaction to see one of the two rows
> affected by the intervening UPDATE in its state before the intervening
> COMMIT, and the other in its state after that COMMIT?
data committed to that point. It will never see the updated from a
subsequent update until it commits and re-reads
Alan
>Subsequent commits are not visible
> This would not, if I understand correctly, constitute a DIRTY READ
> (which Firebird does not allow), as both versions are committed, just
> not by the same transaction.
>
> It might nevertheless be undesirable.
> --
> Michael Ludwig