Icon View Incident Report

Serious Serious
Reported By: Fernando Dias
Reported On: 3/21/2011
For: Version 2.05 Build 4
# 3415 Self-Referencing Foreign Key Constraints Not Checked for Current Row During Updates

If a FK constraint is self-referencing (i.e. refrences the same table), the target column is not being checked against the foreign key constraint when the target column values are changed in the same row.

CREATE TABLE "SelfReference"
(
"ParentID" INTEGER,
"ID" INTEGER,
CONSTRAINT "PrimaryKey" PRIMARY KEY ("ID"),
CONSTRAINT "ParentIDKey" FOREIGN KEY ("ParentID")
REFERENCES "SelfReference" ("ID")
ON UPDATE NO ACTION
ON DELETE NO ACTION
)

INSERT INTO "SelfReference" VALUES (NULL,100)
INSERT INTO "SelfReference" VALUES (100,200)
INSERT INTO "SelfReference" VALUES (300,300)

UPDATE SelfReference SET ID=50 WHERE ID=300



Resolution Resolution
Fixed Problem on 3/24/2011 in version 2.05 build 5


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image