Altering default column value SLOW!

I have a large MyISAM table, and I would like to change the default value for one of the columns. Using mysql 5.1.31, I issue the following command:

ALTER TABLE medianet_media_files ALTER COLUMN feed_created_id SET DEFAULT 64;

Although this should cause only a simple modification to the .frm file, mysql insists on copying the entire table:

±—±-----±----------±---------------±--------±-----±------------------±-----------------------------------------------------------------------------+| Id | User | Host | db | Command | Time | State | Info |±—±-----±----------±---------------±--------±-----±------------------±-----------------------------------------------------------------------------+| 90 | root | localhost | mog_production | Query | 48 | copy to tmp table | ALTER TABLE medianet_media_files ALTER COLUMN feed_created_id SET DEFAULT 64 | | 91 | root | localhost | mog_production | Query | 0 | NULL | show full processlist | ±—±-----±----------±---------------±--------±-----±------------------±-----------------------------------------------------------------------------+2 rows in set (0.00 sec)

Any ideas?

You can try this if you want: ke-alter-table-online-for-certain-changes/

Thanks! Creating another table with an identical schema, setting the default value for columns in the empty table and then copying the .frm for that table over the .frm for the non-empty one and doing a flush table worked like a charm. I was already using this technique to delay building the indexes for the primary keys when initially loading these large tables (although in that case, the .MYI is copied too). All this brought down the run time from over 12 hours to one hour.

It should be noted that in that reference as well as the MySQL High Performance book (page 146), it is mentioned specifically that altering the default value for a column the way I was doing it should NOT cause a table rebuild. Someone even mentioned that they had verified that it does not. I suppose my experience should be considered evidence that at least in mysql 5.1.32, this is not true.