logo       
Bookmark and Share

Re: Can't create FOREIGN KEY restraints on InnoDb tables: msg#00667

db.mysql.general

Subject: Re: Can't create FOREIGN KEY restraints on InnoDb tables

Hi!

NOT NULL does not prevent the creation of a foreign key constraint. I think
the problem was that Andy did not create an index explicitly on the foreign
key (he created only on the referenced key).

Regards,

Heikki
Innobase Oy

----- Original Message -----
From: ""Roger Baklund"" <roger@xxxxxxxxxxx>
Newsgroups: mailing.database.mysql
Sent: Tuesday, June 25, 2002 1:16 AM
Subject: Re: Can't create FOREIGN KEY restraints on InnoDb tables


> * andy@xxxxxxxxxxx
> [...]
> > The referred to keys are the same type and are indexed (they are
> [...]
> > CREATE TABLE genres (
> > genre_id SMALLINT NOT NULL PRIMARY KEY,
> [...]
> > genre_id SMALLINT,
>
> ...does not look the same to me... ;)
>
> --
> Roger
> sql
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread112891@xxxxxxxxxxxxxxx>
> To unsubscribe, e-mail
<mysql-unsubscribe-mysql=freebsd.csie.nctu.edu.tw@xxxxxxxxxxxxxxx>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>



---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <mysql-thread112914@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail
<mysql-unsubscribe-gcdmg-mysql=m.gmane.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise