Irwin,

DROP FOREIGN KEY was implemented after 4.1.0.

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for MySQL

Order MySQL technical support from https://order.mysql.com/


----- Original Message ----- 
From: "Irwin Boutboul" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Wednesday, September 17, 2003 2:46 AM
Subject: innodb tables key problem ?


> --=_alternative 0082893685256DA3_=
> Content-Type: text/plain; charset="US-ASCII"
>
> I have created a new database with those tables.
>
> DROP TABLE IF EXISTS ACL_GROUPS;
> CREATE TABLE ACL_GROUPS (
>   groupid char(30) character set latin1 NOT NULL default '',
>   creationtime datetime default '0000-00-00 00:00:00',
>   active smallint(6) default '1',
>   priority smallint(6) default '1',
>   PRIMARY KEY  (groupid)
> ) TYPE=InnoDB;
>
> --
> -- Table structure for table 'ACL_GROUP_LIST'
> --
>
> DROP TABLE IF EXISTS ACL_USERS;
> CREATE TABLE ACL_USERS (
>   groupid char(30) character set latin1 NOT NULL default '',
>   userid char(30) character set latin1 NOT NULL default '',
>   PRIMARY KEY  (groupid,userid),
>   FOREIGN KEY (`groupid`) REFERENCES `ACL_GROUPS` (`groupid`) ON DELETE
> CASCADE
> ) TYPE=InnoDB;
>
> (there is no data in the tables).
>
> Then when I try to drop a foreign key, I get this error:
>
> mysql> alter table ACL_USERS drop foreign key groupid;
> ERROR 1005: Can't create table './irwingrid/#sql-7515_3.frm' (errno: 150)
>
>
> it is mysql 4.1.
> Is this  a known issue ? If I convert the tables to MyIsam and then try to
> drop the key, it works fine.
>
>
>
> Irwin Boutboul
> Advanced Internet Technology
> 150 Kettletown Road, B2-N06
> Southbury, CT 06488
> Phone: 203-486-5614
>
> --=_alternative 0082893685256DA3_=--



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to