Bug #42002 ONLINE column rename is not supported by NDB doc. indicates otherwise.
Submitted: 9 Jan 2009 18:31 Modified: 18 Jan 2009 13:06
Reporter: Matthew Montgomery Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.1/5.1-telco OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[9 Jan 2009 18:31] Matthew Montgomery
Description:
Docs are confusing regarding ONLINE column rename.

The ONLINE keyword can be used to perform online ADD COLUMN, ADD INDEX (including CREATE INDEX  statements), and DROP INDEX  operations on NDB tables beginning with MySQL Cluster NDB 6.2.5 and MySQL Cluster NDB 6.3.3, as well as online renaming of tables and columns. Online renaming operations (but not online adding or dropping of columns or indexes) are also supported for MyISAM  tables.

How to repeat:
## MyISAM

mysql> DROP TABLE IF EXISTS `t1`;
Query OK, 0 rows affected, 1 warning (0.03 sec)

mysql> CREATE TABLE `t1` ( id INT UNSIGNED PRIMARY KEY )  ENGINE=myisam;
Query OK, 0 rows affected (0.02 sec)

mysql> ALTER ONLINE TABLE `t1` CHANGE id id1 INT UNSIGNED;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

## NDB 

mysql> DROP TABLE IF EXISTS `t1`;
Query OK, 0 rows affected (0.00 sec)

mysql> DROP TABLE IF EXISTS `t2`;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> CREATE TABLE `t1` ( id INT UNSIGNED PRIMARY KEY ) ENGINE=ndbcluster;
Query OK, 0 rows affected (0.94 sec)

mysql> ALTER ONLINE TABLE `t1` CHANGE id id1 INT UNSIGNED;
ERROR 1235 (42000): This version of MySQL doesn't yet support 'ALTER ONLINE TABLE `t1` CHANGE id id1 INT UNSIGNED'
mysql> ALTER ONLINE TABLE t1 RENAME TO t2; 
Query OK, 0 rows affected (0.53 sec)

Suggested fix:
Doc. should indicate that the ONLINE rename of columns is supported by MyISAM but not NDB.  NDB does support rename of tables in an ONLINE mode.

There is no indication of what ALTER ONLINE options InnoDB does or does not support.
[9 Jan 2009 18:31] MySQL Verification Team
referenced doc. http://dev.mysql.com/doc/refman/5.1/en/alter-table.html
[9 Jan 2009 19:05] Jon Stephens
1. Please confirm with developers that this is intended behaviour and not a server bug. The information in the Manual regarding support of online operations and the ONLINE keyword was correct when written; if this has changed intentionally, then I need to be informed of this fact as well as the version(s) in which the change(s) took place. If this change is unintentional, then it's a Server bug and needs to be fixed.

2. The documentation states that online operations are supported for NDBCLUSTER and MyISAM tables. What need is there to refer to other storage engines, since they're not relevant to this? I don't see any suggestion that online operations are supported for any other storage engines, which is as it should be.
[18 Jan 2009 13:05] Jon Stephens
I have re-worded the indicated section of "ALTER TABLE Syntax" to remove confusion as to which online operations are permitted with NDBCLUSTER and MyISAM tables.