IC62816: ERROR 530 CHECK CONSTRAINT FAILED SHOULD GIVE A MORE MEANINGFUL EXPRESSION

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • Executing the following set of statements:
    
    CREATE TABLE test (serno INTEGER);
    INSERT INTO test VALUES(null);
    ALTER TABLE test MODIFY serno SERIAL NOT NULL;
    
    gives
    
       530: Check constraint () failed.
    
    This error could be more meaningful to explain the type of the
    failure.
    
    finderr 530 gives
    -530    Check constraint constraint-name failed.
    
    The check constraint placed on the table column was violated. To
    see the
    check constraint associated with the column, query the syschecks
    system
    catalog table. However, you must know the constrid for the check
    constraint
    before you query syschecks. (The constrid is assigned in the
    sysconstraints
    system catalog table.) Use the following subquery to show the
    check
    constraint for constraint-name:
    
    SELECT * FROM syschecks
            WHERE constrid = (SELECT constrid FROM sysconstraints
               WHERE constrname = constraint-name)
    
    Here the constraint name is mentioned which is empty in the
    example of the reproduction script
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users performing DDL operations on a table for adding        *
    * implicit or explicit check constraints                       *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * The user tries to modify an existing table by changing       *
    * thedata type of a column to serial, but this violates an     *
    * implicit check constraint for the serial data type.  A error *
    * -530 is thrown, however there is no constraint name.         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to 11.50.xC8 and above.                              *
    ****************************************************************
    

Problem conclusion

  • When performing a DDL operation on a table, if such operation
    has a check constraint that is violated by the existing data on
    the table, the constraint name for error -530 will not be
    available. The reason for this is that since the DDL operation
    did not succeed, the constraint itself was not created, and
    thus not listed in the system catalog. The error text for -530
    has been updated.
    
    Problem first fixed in 11.50.xC8.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC62816

  • Reported component name

    IBM IDS ENTRP E

  • Reported component ID

    5724L2304

  • Reported release

    B15

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-08-27

  • Closed date

    2010-10-07

  • Last modified date

    2010-10-07

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM IDS ENTRP E

  • Fixed component ID

    5724L2304

Applicable component levels

  • RB15 PSY

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Informix Servers

Software version:

B15

Reference #:

IC62816

Modified date:

2010-10-07

Translate my page

Machine Translation

Content navigation