DB2 - Problem description
Problem IC89750 | Status: Closed |
SQL20253N RETURNED WHEN MULTIPLE UPDATES ON THE SAME COLUMN FOR COMPILED TRIGGERS | |
product: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problem 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. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * All * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Update to v10.1 Fix Pack 3 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
Solution | |
Problem first fixed in v10.1 Fix Pack 3 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.01.2013 01.10.2013 01.10.2013 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.3 | |
10.1.0.3 |