Bug #48362 Comment in index definition in table definition is not supported.
Submitted: 28 Oct 2009 7:01 Modified: 20 Dec 2013 12:20
Reporter: Nirbhay Choubey Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:5.1 and 5.4 OS:Any
Assigned to: CPU Architecture:Any

[28 Oct 2009 7:01] Nirbhay Choubey
Description:
While trying to create a table with a comment in index definition (shown below) on mysql-5.1 & mysql-5.4, the statement fails with a syntax error, but the same statement passes on 6.0 server.

Statement:
CREATE TABLE t1 (i INTEGER, INDEX i1(i) COMMENT 'index on i');  

Server versions used : 
5.1.40 (above statement failed)
5.4.3-beta (above statement failed)
6.0.8-alpha (above statement passed)

I am not sure if this is similar to the bug#2935 (http://bugs.mysql.com/bug.php?id=2935), or the feature is intended or not for 5.1/5.4 server line.

How to repeat:
See the description above.
[28 Oct 2009 13:53] Valeriy Kravchuk
Indeed, this works in 6.0.x, but not in older versions. But our manual for 5.1 and 5.4 does NOT mention comments for indexes. So, this is not a bug.

Some day we will release 6.0.x again, and let's hope this feature will still be there and properly documented.
[20 Dec 2013 12:20] Erlend Dahl
This was implemented in MySQL 5.5.3. Cf http://dev.mysql.com/doc/refman/5.5/en/create-index.html