Kbase P7616: When an Indexed Field's DATA TYPE is changed, incremental .df fails to load
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  09/11/2006 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.1x
SYMPTOM(s):
** Error during RENAME INDEX **
Try to modify unknown INDEX
When an Indexed Field's DATA TYPE is changed, incremental .df fails to load
Errors during load of the incremental .df:
can not remove last non word index
Field's DATA TYPE was changed through Data Dictionary
Field Name remained the same
Applying a delta / incremental .df
CAUSE:
Bug# 20020828-012
CAUSE:
If the source Database has had index changes, when this delta .df is applied to the target Database it will fail. An issue was identified in the logic behind this operation: when a FIELD is INDEXED, we allow dropping of that field before it's been removed from the INDEX, resulting in an incremental .df failing to apply.
For example;
When the data type of an indexed field is changed, in the Data Dictionary: A field that is indexed is not allowed to be dropped before index(s) are removed, so:
a) Drop the index
b) Drop the field
c) Add the field again (with the new data type)
d) Re-create the index
However when the incremental .df is created the following are recorded:
DROP FIELD "field_x" OF "table-name" # BUT this field is indexed!
ADD FIELD "field_x" OF "table-name" AS logical
....
RENAME INDEX "Index_name" TO "temp-10000" ON "table_name"
ADD INDEX "Index_name" ON "table_name"
AREA "Area_name"
INDEX-FIELD "field_x" ASCENDING
NOTE: there is no DROP'ing of the temp index either.
FIX:
This issue has been addressed in Progress 9.1D07 and OpenEdge 10.0A.
To immediately workaround this issue, edit the .df file as follows:
a) Remove the line that renames the index, ie Delete the "RENAME INDEX" line.
b) Remove the line that drops that index, ie Insert "DROP INDEX Index_name ON Table_name" before the "DROP FIELD"
For example:
DROP INDEX "Index_name" ON "table_name" # added line to drop index first
DROP FIELD "field_x" OF "table-name" # field is no longer indexed
ADD FIELD "field_x" OF "table-name" AS logical
....
ADD INDEX "Index_name" ON "table_name"
AREA "Area_name"
INDEX-FIELD "field_x" ASCENDING
If the index is the only index on a table (a primary index) it cannot be deleted (DROPped) as described above, it will fail with "can not remove last non word index".
An extra step is needed: to add a temporary index on a previously non-indexed field, then drop the primary index, field changes, add the primary index, and lastly drop the temp index