Subject Re: [firebird-support] Re: Feature request : Generator tables
Author Jonathan Neve
benmarron a écrit :

>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 confirming,
what I meant was simply inserting the record. So, the value before
inserting is of no importance.

Jonathan Neve.