According to MySQL manual, table comments are limited to 60 characters. I'm designing the schema in MySQL Workbench, which does not enforce this limit, so I end up with writing more than 60 symbols quite often, and this causes the SQL script to fail. To tell the truth I would be quite happy with table comments being internal to my schema (i.e. not exported to the actual database), but Workbench doesn't allow this either. Hence my question: is there a way to increase maximum length of table comment in MySQL to 255?
问题:
回答1:
According to this bug report, Workbench was fixed in 5.0.18 to not allow comments over 60 characters.
I'm pretty sure there's no way to increase the limit, but if you turn off strict mode (even temporarily while you import) then it should truncate it with a warning instead of throwing an error.
回答2:
I came here from google - There is no way (besides the patch), but the comment lengths have been significantly increased, as I summed up here https://stackoverflow.com/a/14502814/857958
回答3:
I came here from Google. This 60-character limit has been defunct for a long time http://dev.mysql.com/doc/refman/5.5/en/create-table.html
COMMENT
A comment for the table, up to 2048 characters long (60 characters before MySQL 5.5.3).
回答4:
It is the first flaw i found in MySQL Workbench. I never used table comments before, but I do like them. Why use embrace (or prepend) the comments using hash tags in the generated SQL script? Won't fail them.
回答5:
Patch to enable longer comments in MySQL available here, link text