> Hrmm.  Is that a "feature" that's planned to be fixed.  Obviously,
 > if you have a table with thousands or millions of rows in it, ALTER
 > TABLE is a lot easier than copying the table to a temp table,
 > dropping the original table, creating a new table, and copying the
 > data back in.

Actually, if you read the documentation for ALTER TABLE,
they're almost equivalent.  Try it and you'll see.  Don't
expect it to run any faster either, I'm afraid.

 From the documentation:

[[ ALTER TABLE works by making a temporary copy of the original table. The 
alteration is performed on the copy, then the original table is deleted and the 
new one is renamed. This is done in such a way that all updates are 
automatically redirected to the new table without any failed updates. While 
ALTER TABLE is executing, the original table is readable by other clients. 
Updates and writes to the table are stalled until the new table is ready. ]]

Steve


> : This is a feature (= documented bug). Look at
> : http://www.innodb.com/ibman.html:
> : ...
> : Updated December 13, 2001: Added a note that you should not do an ALTER
> : TABLE to a table which has or is referenced in a foreign key constraint, but
> : use DROP TABLE + CREATE TABLE to modify the schema
> 

> 


-- 
Steve Rapaport
World Citizen


---------------------------------------------------------------------
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