Subject | Re: Feature request : Generator tables |
---|---|
Author | benmarron |
Post date | 2004-02-20T10:34:36Z |
--- In firebird-support@yahoogroups.com, Jonathan Neve
<jonathan@m...> wrote:
Bernard Collet
<jonathan@m...> wrote:
> benmarron a écrit :confirming,
>
> >In my opinion, not multi-user safe. Example :
> >
> >Suppose generator gen_name is 10
> >
> >1. User A see your "gen_id(gen_name, 0) +1" = 11
> >2. User B see your "gen_id(gen_name, 0) +1" = 11
> >3. User B confirms and get "gen_id(gen_name, 1)" = 11
> >4. User A confirms and get "gen_id(gen_name, 1)" = 12 !!!
> >
> >
> What's wrong with that?
> That's exactly what I want. Obviously, it won't be unique before
> confirming, and obviously, the code might have to change when they
> confirm the record. That's the idea of confirming. Also, by
> what I meant was simply inserting the record. So, the value beforeIn this case, all is OK.
> inserting is of no importance.
>
> Jonathan Neve.
Bernard Collet