|
|||||||||||
|
Re: Before I shoot myself in the foot...
From: Brent Baisley <brenttech(at)gmail.com>
Date: Wed Jun 13 2007 - 14:26:54 EDT
By putting both commands on 1 line, it will execute almost immediately.
Then you can alter the table you renamed to y, since it's not being used
it won't lock up anything. Then rename it back when you are done. If you
have an auto increment field in the table, make sure you set the auto
increment value to a number higher than what accumulated in the
temporary holding table.
That will swap the tables back, y becomes x, and x become y. The you can do an insert select from table y, which is holding the data that accumulate while you were altering the other table. It's convoluted and round about, but you won't lose any data. And it may not be feasible if there are data dependencies within the same table.
Baron Schwartz wrote:
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=lists@pantek.comReceived on Wed Jun 13 14:38:21 2007 This archive was generated by hypermail 2.1.8 : Wed Jun 13 2007 - 14:40:03 EDT |
||||||||||
|
|||||||||||