Tuesday, April 25, 2006

No more FOREIGN KEYS!? (BUG)

I do not (want to) believe it:
SQL*Plus: Release 10.2.0.1.0 - Production on Ti Apr 25 22:31:37 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.


Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> create table t1(c1 number,constraint t1_pk primary key (c1) using
index novalidate);

Table created.

SQL> create table t2 (c1 number ,c2 number );

Table created.

SQL> alter table t2 add constraint t2_pk primary key (c1, c2);

Table altered.

SQL> alter table t2 add constraint eir_related_event_fk foreign key (c2)
references t1 (c1) ;

Table altered.

SQL> select eir.c2 from t2 eir join t1 e on eir.c2 = e.c1;
select eir.c2 from t2 eir join t1 e on eir.c2 = e.c1
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Straight from MetaLink - Bug No. 5126551.

Maybe we should just stop using FOREIGN KEY constraints!?!?!

0 Comments:

Post a Comment

<< Home