Subject RE: [IB-Architect] Generator bugfix RFP
Author Ann Harrison
At 01:22 PM 10/23/2000 -0400, Griffin, Patrick J. wrote:

>If so, is one possible solution as simple as creating a new contant (USHORT
>dbb_gv_per_pp; /* generator values per generator page */) and using that new
>value in the sequence/offset calcuation?

Aside from calling the new value dbb_gv_per_gp, that was my thought as
well. Users should examine their generators

select max (rdb$generator_id) from rdb$generators

and consider any over the magic number to be suspect. Here's a
table of magic numbers:

1K 2K 4K 8K
Pre-V6 248 504 1016 2040
V6 124 257 508 1020

Any database that contains generators at or above the magic
number is suspect and should be taken off-line at once. Tables
that rely on those should be checked for data validity. After
the data has been corrected the database should be backed up
and restored to a larger page size if possible. All the suspect
generators should have their values set explicitly to a value
that corresponds to the corrected data.


To avoid confusion, I would suggest creating a new structure
definition for generator pages .... NOT changing the actual
structure on disk, but just to make the difference between the
page types explicit.

/* Generator Page */

typedef struct gpg {
struct pag gpg_header;
SLONG gpg_sequence; /* Sequence number */
SLONG gpg_waste [3]; /* overhead carried for backward
compatibility*/
SLONG gpg_page [1]; /* Generator vector */
} *GPG;


And, of course, make the relevant changes in DPM and PAG_init
to set the new values.

Regards,

Ann