Kbase P13252: Error 1422 in version 8.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
FACT(s) (Environment):
UNIX
Progress 8.3E
SYMPTOM(s):
SYSTEM ERROR: Index in for recid could not be deleted. (1422)
Application contains BUFFER-COPY NO-ERROR.
BUFFER-COPY NO-ERROR may be elsewhere from the program that generates 1422.
Destination table for BUFFER-COPY has mandatory, indexed fields.
CAUSE:
This is a know issue.
Error 1422 is a consequence of some 'dirty' index entries which are left by a BUFFER-COPY statement when all of the following are true:
- The BUFFER-COPY statement has the NO-ERROR option.
- The destination table has mandatory fields.
- One or more of these mandatory fields are indexed.
- The BUFFER-COPY happens to copy null values to the mandatory, indexed fields.
Because the BUFFER-COPY attempts to assign null values to mandatory fields, the BUFFER-COPY operation fails. What happens then is that the destination record is restored to the status it was before the BUFFER-COPY.
However, under the given circumstances, the index entries that Progress created temporarily for the mandatory, indexed fields are not undone and are written to the database instead. As a consequence, the indexes are not any more in full sync with the data and eventually record updates and record deletions may fail with error 1422.
FIX:
Make sure that you test the ERROR-STATUS:NUM-MESSAGES attribute after the BUFFER-COPY NO-ERROR. If this attribute returns a number greater than 0, then the BUFFER-COPY has failed and corrective action must be taken.
Depending on your application design, you may prefer to:
- Undo explicitly the (sub)transaction where the BUFFER-COPY resides, or
- After the BUFFER-COPY, make sure that the mandatory, indexed fields are assigned non-null values. This must be done before the record goes out of scope, that is, before it is flushed to the database alongside with the 'dirty' index entries and the index damage becomes permanent.