Icon View Incident Report

Serious Serious
Reported By: Ian Turner [Aurora Computer Solutions]
Reported On: 4/23/2013
For: Version 2.11 Build 3
# 3757 Altering a Primary Key Constraint that is the Target of Foreign Key Constraints Disables Checks

If a primary key contraint is altered in any way (eg even just adding to the description) using EDB Manager, then any foreign key constraints in other tables that use this index appear to be broken.

For example in my database, table acManufacturer has a primary key contraint pkManufacturerCode. The acStock table uses this as a lookup table using a foreign key constraint (fkManufacturerCode). Try to delete a manufacturer that is being used in an acStock record (in my attached sample code = 'NORTON') and the appropriate exception is raised.

Now make a trivial change to acManufacturer's primary key, say add something to the description. then try the delete again and this time it succeeds - the constraint has not been applied. If, after the primary key is altered, a trivial change is also applied to acStock's fkManufacturerCode foreign key constraint as well and then try the delete all is well and a constraint exception is raised.

Comments Comments
An internal structure was not being updated properly during the primary key constraint alteration, thus losing the existing information about which foreign key constraints needed checked for the primary/unique keys.

Resolution Resolution
Fixed Problem on 6/12/2013 in version 2.13 build 1

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