Subject Re: [firebird-support] Rollback on FB2.5
Author Lester Caine
Kjell Rilbe wrote:
> Den 2011-06-15 12:51 skrev Milan Tomeš - Position såhär:
>> > It's not a bug, it's a feature. Generators aren't under a transaction
>> > control. So when you get new value from generator it's reserved and is
>> > not rolled back when you rollback the transaction.
> But Lester said this was a transaction inside which the generators
> (several) were CREATED. I assume generator CREATION is under transaction
> control. Or isn't it?
>
> Regardless of the answer to that question, the behavior should be
> identical for all generators.
>
> A suspicion: maybe the generators that were not rolled back (removed on
> rollback) were perhaps the only ones that had also been incremented/used
> inside the creating transaction?
>
> That would make some kind of sense - generators that are ONLY created
> are rolled back, but as soon as you've generated a value with it, it
> falls under the "not under transaction control" category, and is left in
> existende upon rollback.
>
> But I'm only speculating here...

I've only got a single connection in the installer ... The generic code sets the
generator to '0' after creating it - but I've spotted the problem here, and it's
code after the commit failed which is THEN using the generators. BUT in theory
those generators should not exist?

Part of the trouble here is that the PHP driver has not returned an error when
the commit failed, which is what I am working on at the moment. Thought this
would just be a quick job so I may just clone an existing database and worry
about the installer later :( I need the site up more than I need to fix the bugs ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php