Bug #76193 Truncated comments
Submitted: 6 Mar 2015 15:51 Modified: 2 Jul 2015 17:34
Reporter: Alain Forget Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S2 (Serious)
Version:6.2 OS:Windows (8.1)
Assigned to: CPU Architecture:Any
Tags: comment truncate editor

[6 Mar 2015 15:51] Alain Forget
Description:
When I try to input a long comment to describe my tables and rows, upon Applying my changes, the SQL editor automatically replaced my comment with the following:

ALTER TABLE `my_schema`.`my_table` 

COMMENT = 'This is a really long comment as an example to demonstrate t' /* comment truncated */ /*he unnecessary truncation bug.*/ ;

Thus, my comment gets truncated and is not completely added to the database. I do not understand why the SQL editor would truncate a comment that the user deliberately typed in to describe their database.

This bug occurs not only when ALTERing, but also when CREATEing and INSERTing.

How to repeat:
Simply try typing a long comment into the Comment box the Alter Table interface, pressing the Apply button, and examine the resulting SQL statement. Of course, if the SQL statement is applied, the comment is immediately truncated.

Suggested fix:
Do not truncate or modify the user's comment in any way. Add it to the table as the user typed it (add escape characters for special symbols, of course). Just treat it as normal text.
[9 Mar 2015 6:12] MySQL Verification Team
Hello Alain Forget,

Thank you for the report.
I'm not seeing this issue on 6.2.5/6.3.1 builds(WIn7). Could you please confirm your WB version and also provide exact repeatable test case i.e ALTER etc with exact COMMENT text used?

Thanks,
Umesh
[9 Mar 2015 17:28] Alain Forget
Here's some selected output from the Help -> System Info menu options:

MySQL Workbench Community (GPL) for Windows version 6.2.4  revision 12437 build 2426 (64 bit).
OS: Microsoft Windows 8.1 Pro

When I try to Check for Updates, it says I have the most recent version.

I will provide screenshots below of the exact steps I take, starting from the Alter Table dialog where the comment is entered. The colours may look different because I have high contrast display settings (which makes text white, but Workbench fails to make the background black...but that's another issue, see http://bugs.mysql.com/bug.php?id=70750).

Thanks,
Alain
[9 Mar 2015 17:29] Alain Forget
WB Alter Table. Note long comment.

Attachment: MySQLWorkbench_CommentTruncation_AlterTable.png (image/png, text), 22.04 KiB.

[9 Mar 2015 17:30] Alain Forget
WB Apply SQL to DB dialog contents. Note that comment is not automatically truncated.

Attachment: MySQLWorkbench_CommentTruncation_ApplySQLToDBDialog.png (image/png, text), 48.42 KiB.

[9 Mar 2015 17:31] Alain Forget
edit: Note that comment is NOW automatically truncated.
[2 Jul 2015 16:48] MySQL Verification Team
Please try version 6.3.4. Thanks.
[2 Jul 2015 17:34] Alain Forget
Fixed in 6.3.4