Michael Paesold wrote:
>
> Jan Wieck wrote:
> > > In any case, why don't we get a patch against 7.3, and make an
> > > announcement and let people who are interested use it and test it. With
> > > in-field testing it'd probably be safe enough. :)
> >
> > Here it is.
> >
>
> [patch... skipping]
>
> I applied the patch to a 7.3.2 installation, and did a make clean, make,
> make check. There is one regression error. Is this an expected behaviour? Or
> did I do something wrong? See regression diffs:
This is expected. The RI violation in the case of deleting a referenced
PK row that actually is the defaults values of the FK table is now
detected differently. Hence the change in the error message text.
Jan
>
> *** ./expected/foreign_key.out Sun Sep 22 02:37:09 2002
> --- ./results/foreign_key.out Sat Apr 12 20:44:54 2003
> ***************
> *** 882,888 ****
> ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- fails (1,1) is being referenced (twice)
> update pktable set base1=3 where base1=1;
> ! ERROR: $1 referential integrity violation - key referenced from pktable
> not found in pktable
> -- this sequence of two deletes will work, since after the first there
> will be no (2,*) references
> delete from pktable where base2=2;
> delete from pktable where base1=2;
> --- 882,888 ----
> ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- fails (1,1) is being referenced (twice)
> update pktable set base1=3 where base1=1;
> ! ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- this sequence of two deletes will work, since after the first there
> will be no (2,*) references
> delete from pktable where base2=2;
> delete from pktable where base1=2;
>
> Best Regards,
> Michael Paesold
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #