On Thu, Jul 18, 2002 at 03:41:01PM +0300, Victoria Reznichenko wrote:
: Archbold,
: Thursday, July 18, 2002, 12:18:09 AM, you wrote:
: 
: A> I'm having a problem dropping a foreign key constraint from an Innodb table. I am 
:using MySQL 3.23.51 for Win32.  Any help would be greatly appreciated....
: 
: A>  I have a simple set up like the one below:
: 
: A> CREATE TABLE mastertable
: A> (
: A> masterkey INT NOT NULL PRIMARY KEY AUTO_INCREMENT
: A> ) TYPE=innodb;
: 
: A> CREATE TABLE othertable
: A> (
: A> otherkey INT NOT NULL PRIMARY KEY AUTO_INCREMENT
: A> masterkey INT NOT NULL,
: A> INDEX (masterkey),
: A> FOREIGN KEY (masterkey) REFERENCES mastertable (masterkey) ON DELETE CASCADE
: A> ) TYPE=innodb;
: 
: Use DROP TABLE and then CREATE TABLE to remove foreign key
: constraints.

Maybe Heikki can expand on this, because this is really an unacceptable         
way to remove a foreign key.  What do you do with a table that has              
tens or hundreds of millions of rows of data?  Do you copy out the              
data, recreate the table, then copy it back in?  Do you realize                 
what type of performance/time/service hit that would place on a                 
database, just to remove a foreign key?                                         
                                                                                
Are there any plans to introduce this seemingly basic functionality?            
                                                                                
Philip


sql, query

Please, please, the filter needs to be updated to allow more than
just posts with sql or query in them.  I replied to a post on coming
from this list and it was rejected by the query.  That's simply
asinine.  I can't believe it couldn't even pick out.  Please update
the filter with words/phrases such as "innodb", "index", "foreign
key", or "table" so we don't have to keep resending replies to the
list.

Either that, or turn the list into subscriber only.  I realize that
it may discourage some people from asking for help, but it's
definitely more discouraging to have your posts rejected because
you didn't use one of *two* keywords.

* Philip Molter
* Texas.net Internet
* http://www.texas.net/
* [EMAIL PROTECTED]

---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to