CRC values are used to check if the database schema matches the expected schema for precompiled r-code. Progress table and database CRC calculations involve the following fields from the _File, _Field, _Index and _Index-Field Metaschema tables:
1. _File:
2. _Field
- _Field-Name
- _Data-Type
- _dtype
- _sys-field
- _field-rpos
- _Decimals
- _Order
- _Extent
- _Fld-stdtype
- _Fld-stlen
- _Fld-stoff
- _Fld-case
3. _Index
- _Index-Name
- _Unique
- _num-comp
4. _Index-Field
- _Field-Name
- _Ascending
- _Abbreviate
- _Unsorted
Prior to Progress 9.x:Indexes of a table do not have their own CRCs, a change to an index is considered a change to the table.
- Any change to an index automatically changes the CRC value of a table.
- The resulting CRC is stored in the _CRC field of the _File record for the table.
- A CRC mismatch on a table or index referenced in the r-code would stop the r-code from loading.
Progress 9.x and later:
Indexes have their own CRCs. Indexes can be added/dropped/modified without modifying the table CRC
- A change to the listed fields in _File or _Field automatically changes the CRC value of a table. The resulting CRC is stored in the _CRC field of the _File record for the table.
- A change to the listed fields in _Index or _Index-Field automatically changes the CRC value of the index. The resulting CRC is stored in the _Idx-CRC field of the _Index record for the index. Only applications that use a changed index must be recompile.
- In current releases (OpenEdge 11.x), due to changes to better support online schema changes and to have more portable code in DataServer environments, a mismatch CRC may not prevent the r-code from running under some instances. Namely, if the change to the table is a simple addition of one or more fields, the old r-code will still execute, even though the CRCs do not match.
- When the CRCs do not match, the AVM will check if the fields of the table (specifically their names, data types, extent and logical field record positions or _Field-rpos) have changed since the r-code was compiled. If they have not changed, the AVM will run the old r-code.