Informix Error -518: Child constraint constraint-name not found.
Cause and resolution
Child constraint constraint-name not found.
If this internal error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-518, per the official text, is documented as an internal error with no stated application-level trigger — the guidance is simply to capture circumstances and escalate if it recurs, the same framing as other engine-internal catalog-consistency errors in this range.
- An internal catalog inconsistency between a referential (foreign-key) constraint's parent and its expected child-side constraint entry — the general category of condition this error's name and sparse official guidance implies.
- A referential constraint left in a partially-modified state by an interrupted or failed DDL
operation (an
ALTER TABLEinvolving a foreign key that didn't complete cleanly). - Concurrent DDL against the same referential relationship — one session altering a foreign key's constraints while another session's operation still expects the prior catalog state.
Solutions / Resolution
- If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance — there is no documented general application-level fix.
- Capture the exact statement in progress, the table/constraint names involved, and any preceding DDL against the same referential relationship before escalating.
- Check for a preceding failed or interrupted
ALTER TABLEinvolving the foreign key, since a partially-applied constraint change is a plausible non-engine-internal contributor worth ruling out before treating this as purely internal.
Examples
Capturing circumstances for escalation
-- Record the exact statement and constraint names involved:
ALTER TABLE order_items DROP CONSTRAINT fk_order_items_orders;
-- -518: Child constraint fk_order_items_orders not found.
along with whether any prior ALTER TABLE against order_items or orders involving this
foreign key failed or was interrupted.
Diagnostic Checks
- Check for a recent failed or interrupted
ALTER TABLEtouching the foreign key relationship named in the error. - Query
sysconstraints/sysreferencesfor the constraint's current catalog state to see whether the parent-side constraint exists without a matching child-side entry. - Capture full circumstances for escalation if no preceding failed DDL explains the state.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -518 in this set yet.
Sparse official guidance, framed as internal — check for a preceding failed or interrupted DDL operation against the same foreign key before treating it as purely engine-internal.