IBM Support

IT33537: UNEXPECTED INTERNAL ERROR 172 RUNNING MERGE STATEMENT USING SUBQUERIES

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

  • A MERGE statement involving multiple subqueries may fail with
    error 959 / 172 when a join condition exists that connects the
    two subqueries.
    
    An example statement:
    
    MERGE INTO target t USING
    ( SELECT mnum, cref FROM source ) x
    ON t.num = x.mnum
    WHEN MATCHED THEN UPDATE
      SET code =
      (SELECT code FROM ref WHERE cref = x.cref);
    
    An Assert Failure is generated which includes a thread stack
    similar to:
    
    ld_newvals_in2tmpbuf
    subqcache_find
    chkrmk
    exsubq
    ev_cb
    new_eval
    eval_projection_list
    dodmlrow
    process_upsert
    upsert_next
    doupsert
    excommand
    sq_execute
    sqmain
    

Local fix

  • a workaround can be using a view for the target table:
    
    create view vt as (select num, code from target);
    merge into vt t using
    ...
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users of Informix Server prior to 12.10.xC15 and 14.10.xC5.  *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Informix Server 12.10.xC15 (when available) or    *
    * 14.10.xC5.                                                   *
    ****************************************************************
    

Problem conclusion

  • Fixed in Informix Server 12.10.xC15 and 14.10.xC5.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT33537

  • Reported component name

    INFORMIX SERVER

  • Reported component ID

    5725A3900

  • Reported release

    C10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-14

  • Closed date

    2021-01-18

  • Last modified date

    2021-01-18

  • 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

    INFORMIX SERVER

  • Fixed component ID

    5725A3900

Applicable component levels

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSGU8G","label":"Informix Servers"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"C10"}]

Document Information

Modified date:
19 January 2021