IC89750: SQL20253N RETURNED WHEN MULTIPLE UPDATES ON THE SAME COLUMN FOR COMPILED TRIGGERS

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • If a compiled trigger is fired multiple times due to the
    multiple foreign key constraints and attempts to update the same
    column, the update will be blocked with SQL20253N error.
    
    e.g.
    
    create table p1(p1_id int not null primary key)@
    
    create table c1(c1_id int not null primary key, p1_id int)@
    
    create table c2 (c2_id int not null primary key, p1_id int,
    c1_id int, val varchar(10))@
    
    alter table c1 add constraint c1_fk1 foreign key (p1_id)
    references p1 (p1_id) on delete cascade on update no action@
    
    alter table c2 add constraint c2_fk1 foreign key (p1_id)
    references p1 (p1_id) on delete set null on update no action@
    
    alter table c2 add constraint c2_fk2 foreign key (c1_id)
    references c1 (c1_id) on delete set null on update no action@
    
    create trigger t1 before update on c2 referencing new as n for
    each row begin set n.val = val + 1; end@
    
    
    Upon deletion from p1 both c2_fk1 and c2_fk2 constraints are
    triggered which causes trigger t1 to fire twice, attempting to
    update c2.val column each time (which is blocked in existing
    behavior)
    
    This APAR fix modifies the current behavior to allow for
    multiple updates of the same column for compiled triggers, and
    the compiled trigger will execute successfully.
    
    However, this behavior will still be blocked for inline triggers
    at DDL time.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Update to v10.1 Fix Pack 3                                   *
    ****************************************************************
    

Problem conclusion

  • Problem first fixed in v10.1 Fix Pack 3
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC89750

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-22

  • Closed date

    2013-10-01

  • Last modified date

    2013-10-01

  • 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

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA10 PSN

       UP



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

DB2 for Linux, UNIX and Windows

Software version:

10.1

Reference #:

IC89750

Modified date:

2013-10-01

Translate my page

Machine Translation

Content navigation