Bug #29265 Field Comments
Submitted: 21 Jun 2007 11:19 Modified: 20 Feb 2008 15:15
Reporter: Ben Burch Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Information schema Severity:S4 (Feature request)
Version:All OS:Any (All)
Assigned to: CPU Architecture:Any
Tags: comments, information schema
Triage: Triaged: D5 (Feature request)

[21 Jun 2007 11:19] Ben Burch
Description:
For MS SQL there are nice tables holding the comments about each and every object in the database. 

These tables can be updated directly and have simple stored procedures to add comments (extended properties) to them. 

This requires no knowledge of the column definition, solely the name. When using php or Java to amend the comments in a new, large and potentially undocumented database, this causes masses of slowdown in reading the schema and generating the required code.

How to repeat:
Standard method for amending comments

Suggested fix:
Could executing the stored porcedure of the form:

sp_ColumnComment 'tableName', 'columnName', 'Comment'

be a better alternative then having to write:

ALTER table tableName
CHANGE COLUMN columnName
columnName columnType COMMENT 'Comment'
[21 Jun 2007 16:25] Valeriy Kravchuk
Thank you for a reasonable feature request.
[7 Sep 2007 16:23] Sergei Golubchik
This is already implemented in the 5.2 branch
[7 Sep 2007 16:26] Ben Burch
Could you let me know in what form this appears? i.e. in a stored procedure as I mentioned or another way?
[20 Feb 2008 12:13] Ben Burch
Again.... could you let me know how I would use this? Is it in a released version of mySQL and what is the syntax? I can't find it in the documentation anywhere.
[20 Feb 2008 15:15] Sergei Golubchik
Ah, sorry. What you're asking about "Standard method for amending comments" for all object types is not implemented.

What was implemented are only comments for indexes, and longer comments for columns.

http://dev.mysql.com/doc/refman/5.1/en/create-table.html

Thus, I've reopened your feature request.