
|
If you were logged in you would be able to see more operations.
|
|
|
| Planning Status: |
Unspecified
|
|
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;
n = n + 1;
end
end!
-- OK: No sequences.
show sequence!
create sequence s1!
-- Error: S1 is at 1000!
show sequence!
|
|
Description
|
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;
n = n + 1;
end
end!
-- OK: No sequences.
show sequence!
create sequence s1!
-- Error: S1 is at 1000!
show sequence! |
Show » |
| There are no comments yet on this issue.
|
|