Am Mittwoch, 11. Januar 2006 07:59 schrieb Anhaus, Thomas:
> In the documentation
> (http://dev.mysql.com/doc/maxdb/en/6d/117c5fd14811d2a97400a0c9449261/frames
>et.htm) the following rule gives the answer :
>
> A reference cycle in which one referential CONSTRAINT definition does not
> specify CASCADE and all other referential CONSTRAINT definitions specify
> CASCADE is not allowed.
>
> This rule is violated in your example. The rule guarantees unique results
> independent of the order of execution of the referential constraints. We
> know that this is too strict in some cases, but there are no plans to
> change it in the near future.

OK, maybe a bad example. Let's take a look at this table definition:

create table ROLES
(
        ID integer not null,
        NAME varchar(50) not null,
        DESCRIPTION varchar(200),
        CREATED_BY integer not null,
        CREATED timestamp default timestamp not null,
        MODIFIED_BY integer,
        MODIFIED timestamp,
        primary key (ID),
        FOREIGN KEY FK_ROLE_REFE_USER1 (CREATED_BY) REFERENCES USERS (ID) ON 
DELETE 
SET NULL,
        FOREIGN KEY FK_ROLE_REFE_USER2 (MODIFIED_BY) REFERENCES USERS (ID) ON 
DELETE 
SET NULL
)

As far as I understand the restriction you mentioned does not match here, 
right? But this statement fails with the same error. From my point of view 
this should be possible. Is this a bug?

Best regards,
Ralf.

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to