Salesforce

What Metaschema fields are involved in CRC calculations?

« Go Back

Information

 
TitleWhat Metaschema fields are involved in CRC calculations?
URL NameP104149
Article Number000147854
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
What Metaschema fields are involved in table and database CRC calculations?
What parts of the schema definition affect table and index CRC values ?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
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:
  •    _File-Name
  •    _DB-lang
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.
Workaround
Notes
References to other documentation:

Progress Programming Handbook, "R-code Features and Functions"
Progress Version 9 Product Update Bulletin, "R-code Features and Functions"

OpenEdge Deployment: Managing ABL Applications, R-code Features and Functions, "Database CRC changes that do not prevent r-code execution"
Keyword Phrase
Last Modified Date6/12/2019 9:03 AM

Powered by