Bug #27610 ALTER TABLE ROW_FORMAT=... does not rebuild the table
Submitted: 3 Apr 2007 12:26 Modified: 8 Nov 2007 23:47
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.16 OS:Linux (GNU/Linux)
Assigned to: Alexander Nozdrin CPU Architecture:Any

[3 Apr 2007 12:26] Marko Mäkelä
Description:
MySQL 5.1 is not invoking handler::create() in some forms of ALTER TABLE, even though it should.

How to repeat:
create table t(t int primary key)engine=innodb;
alter table t row_format=redundant;
alter table t row_format=compact;
alter table t avg_row_length=8;
alter table t avg_row_length=4;

Suggested fix:
At the very least, rebuild the table for changes of ROW_FORMAT. Appending ENGINE=InnoDB to the ALTER TABLE statements does seem to trigger a rebuild.
[3 Apr 2007 12:48] MySQL Verification Team
Thank you for the bug report.
[25 Oct 2007 11:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36337

ChangeSet@1.2598, 2007-10-25 15:54:37+04:00, anozdrin@station. +3 -0
  Fix for BUG#27610: ALTER TABLE ROW_FORMAT=... does not
  rebuild the table.
  
  The problem was that ROW_FORMAT clause in ALTER TABLE did not trigger
  table reconstruction.
  
  The fix is to rebuild a table if ROW_FORMAT is specified.
[29 Oct 2007 12:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/36552

ChangeSet@1.2599, 2007-10-29 15:42:49+03:00, anozdrin@station. +3 -0
  Fix for BUG#27610: ALTER TABLE ROW_FORMAT=... does not
  rebuild the table.
  
  The problem was that ROW_FORMAT clause in ALTER TABLE did not trigger
  table reconstruction.
  
  The fix is to rebuild a table if ROW_FORMAT is specified.
[29 Oct 2007 13:00] Alexander Nozdrin
Queued into 5.1-runtime.
[7 Nov 2007 21:59] Bugs System
Pushed into 6.0.4-alpha
[7 Nov 2007 22:01] Bugs System
Pushed into 5.1.23-rc
[8 Nov 2007 23:47] Paul DuBois
Noted in 5.1.23, 6.0.4 changelogs.

ALTER TABLE tbl_name ROW_FORMAT=format_type did not cause the table 
to be rebuilt.