Issue Details (XML | Word | Printable)

Key: CORE-3058
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

New generators are created with wrong value when more than 32K generators was previously created

Created: 21/Jun/10 12:17 PM   Updated: 28/Nov/13 10:44 AM
Component/s: Engine
Affects Version/s: 2.5 Alpha 1, 2.5 Beta 1, 2.5 Beta 2, 3.0 Initial, 2.5 RC1, 2.5 RC2
Fix Version/s: 2.5.1, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:

Planning Status: Unspecified

 Description  « Hide
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
  declare n integer = 0;
  declare x integer;
  while (n < 33000)
    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;

-- OK: No sequences.
show sequence!

create sequence s1!

-- Error: S1 is at 1000!
show sequence!

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.