saiph wrote:
create database url; use url
create table cath ( name varchar(10) primary key, ) type=innodb;
create table site ( url varchar(40) primary key, aline varchar(40), cath varchar(10),
constraint fk_cath foreign key(cath) references cath(name) on delete set null on update cascade ) type=innodb;
ERROR 1005 (HY000): Can't create table './url/site.frm' (errno: 150)
the perms are correct indeed without the constraint there are no problems.
You have to put an index on cath before you can use it as a foreign key. See <http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html>.
Michael
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]