Subject Re: [IBO] Re: Generator not incrementing
Author Geoff Worboys
> As far as I have understood this tortuous thread, the problem
> was that the values of the generators appeared to have rolled
> back when the application crashed.
...

Ed is claiming that a generator value has successfully been
committed to inserted record, but then the generator is not
saved when the server subsequently crashes. As I understand
what you posted, this may have been true for FB v1.5.0, but
the bug was fixed where it should have been fixed, in
Firebird, in v1.5.1.

The sample app Ed supplied shows that Firebird does not flush
its generator values to disk until a transaction (since v1.5.1
any transaction) commits. This is normally safe and maximises
performance PROVIDED the generator value is only relied on
within the database (as part of records committed). If you
want to rely on generator values outside the database (as the
sample app implies) then you need the fix that Jason has
provided, and all that fix does is start and stop a transaction
which forces Firebird to flush the generator pages to disk.

If Ed want's to demonstrate that v1.5.6 still has the same
problem as existed in v1.5.0 he will need to supply an insert
and successful commit and then a crash that shows the committed
generator value being lost.

--
Geoff Worboys
Telesis Computing Pty Ltd