Subject | Re: Lock update for checkin/checkout? |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-02-04T17:36:46Z |
--- In firebird-support@yahoogroups.com, Jakub Hegenbart
<Kyosuke@s...> wrote:
Read_commited no_rec_version will return lock conflict even on read
attempt.
Concurrency will see record in the state which was last commited at
this concurrency transaction start moment even if record was changed
and commited 100 times since that moment.
in mentioned article.
Nothing good in general :) But _sometimes_ we are forced to
implement crazy solutions. Maintenance (not structural but attributes
values) of damaged data with presence of users, for example. Look
article ;)
Best regards,
Alrxander.
<Kyosuke@s...> wrote:
> 1) If there's a newer and uncommitted version of a row, NO OTHERYes
> TRANSACTION REGARDLESS OF ITS ISOLATION LEVEL is allowed to either
> update or remove the row
>and it doesn't even see it, although it may(or
> may not, this depends on the I. L.) see it for SELECTs; and...Read_commited rec_version will see last commited version.
Read_commited no_rec_version will return lock conflict even on read
attempt.
Concurrency will see record in the state which was last commited at
this concurrency transaction start moment even if record was changed
and commited 100 times since that moment.
> 2) Having said that, it's a feature intended for as least frequentusage
> as it can be.Yes. I tried to show known reasons to use it and give all warnings
>
> Am I right?
in mentioned article.
> A possibly stupid question: What if there were more rows to beupdated?
Nothing good in general :) But _sometimes_ we are forced to
implement crazy solutions. Maintenance (not structural but attributes
values) of damaged data with presence of users, for example. Look
article ;)
> Does SFUWL work even for SELECTs that aren't 'a part of a cursordoes
> construction?' (sorry, can't come up with a better name...) I mean,
> it lock the records with creating a new version without firingtriggers
> even when called per se, outside SP, for example? (So that the restof
> the transaction can safely crunch the data and update it after awhile
> without risking lost CPU cycles and still without resorting toSNAPSHOT
> TABLE STABILITY or RESERVING ... FOR PROTECTED WRITE which would bean
> overkill for updating few rows)Yes.
Best regards,
Alrxander.