You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This got my attention after reading Norman Dunbar's Firebird Internals document.
When more than 32K generators are created (and deleted), the generator id is restarted. As soon that happens, new generators start getting old (of already deleted) current values.
Test case:
execute block
as
declare n integer = 0;
declare x integer;
begin
while (n < 33000)
do
begin
in autonomous transaction do
execute statement 'create sequence s' || n;
in autonomous transaction do
execute statement 'select gen_id(s' || n || ', 1000) from rdb$database' into x;
in autonomous transaction do
execute statement 'drop sequence s' || n;
::: NB ::: As of Firebird 3.0 we need to make EVERY operation (creation, select gen_id, dropping)
in AUTONOMOUS transaction because physically appearance of generator in database will be on COMMIT only.
Start of discussion with dimitr: 06-mar-2015 23:44.
The text was updated successfully, but these errors were encountered:
Test Details: ::: NB ::: As of Firebird 3.0 we need to make EVERY operation (creation, select gen_id, dropping)
in AUTONOMOUS transaction because physically appearance of generator in database will be on COMMIT only.
Test Details: ::: NB ::: As of Firebird 3.0 we need to make EVERY operation (creation, select gen_id, dropping)
in AUTONOMOUS transaction because physically appearance of generator in database will be on COMMIT only.
=>
::: NB ::: As of Firebird 3.0 we need to make EVERY operation (creation, select gen_id, dropping)
in AUTONOMOUS transaction because physically appearance of generator in database will be on COMMIT only.
Start of discussion with dimitr: 06-mar-2015 23:44.
Submitted by: @asfernandes
Is related to QA442
This got my attention after reading Norman Dunbar's Firebird Internals document.
When more than 32K generators are created (and deleted), the generator id is restarted. As soon that happens, new generators start getting old (of already deleted) current values.
Test case:
execute block
as
declare n integer = 0;
declare x integer;
begin
while (n < 33000)
do
begin
in autonomous transaction do
execute statement 'create sequence s' || n;
in autonomous transaction do
execute statement 'select gen_id(s' || n || ', 1000) from rdb$database' into x;
in autonomous transaction do
execute statement 'drop sequence s' || n;
end
end!
-- OK: No sequences.
show sequence!
create sequence s1!
-- Error: S1 is at 1000!
show sequence!
Commits: df893a7 2db78d0 7a405a4 b345034 FirebirdSQL/fbt-repository@bccd4a4
====== Test Details ======
::: NB ::: As of Firebird 3.0 we need to make EVERY operation (creation, select gen_id, dropping)
in AUTONOMOUS transaction because physically appearance of generator in database will be on COMMIT only.
Start of discussion with dimitr: 06-mar-2015 23:44.
The text was updated successfully, but these errors were encountered: