Bug #95175 Column comment linebreaks unusable
Submitted: 28 Apr 2019 23:56 Modified: 29 Apr 2019 6:36
Reporter: M R Email Updates:
Status: Verified Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.16 OS:Microsoft Windows (Microsoft Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[28 Apr 2019 23:56] M R
This issue was not present in MySQL Workbench Community 6.3.1, and began occurring immediately on updating to the latest release.

Entering multiple lines into the Comments textbox of a column in Table editor and submitting replaces all linebreaks with \n (slash-n) in the textbox. 

Subsequent comment updates doubles the number of slashes, e.g. \\n (slash slash n) and then \\\\n (slash slash slash slash n). 

Expected behaviour: Linebreaks in comments should be rendered transparently and not be re-escaped on submission.

This issue is also present in the latest Mac OS version of MySQL Workbench Community.

How to repeat:
Update comment of a table column with multiple lines using the comments textbox and apply changes.
[29 Apr 2019 6:36] MySQL Verification Team

Thank you for the report and feedback.
Verified as described on Win7 with WB 8.0.16.

[19 Mar 2020 14:50] Sam Abboushi
Version 8.0.18 build 15329599 CE (84 bits)

I request the severity is upgraded from Non-critical: this can result in data loss:

In addition to the doubling of "\" in comments each time table schema is updated:
1) the added "\" characters are counted towards the 1024 character limit of the comment
2) if a comment's length is <=1024 and there are newline characters in the comment, the comment length can increase beyond 1024 because of the duplicated "\" character(s) resulting in the comment being saved that exceeds 1024
3) it's aggravating needing to manually delete the duplicated "\"s before updating a schema especially when I have no choice because the comment length is approaching the 1024 limit and I can't update because the duplicated "\"s within the comment make the length exceed 1024 (i.e. most of the time I just ignore the duplicated "\"s, unless they interfere with my ability to update long comments)
4) it's now very difficult to read multi-line comments because they appear as one long string of text with embedded "\"s

To Recreate: enter a 1022 character multi-line comment and click "Apply>Apply"
Add 1 character to the comment and click "Apply": you will not be able to apply since length exceeds 1024 because of "\"s
Check the length of saved comment to confirm length exceeds 1024
[29 Mar 2020 15:05] Sam Abboushi
I agree with the characterization "unusable" and request that Severity is upgraded: very difficult to make sense of comments when everything is on one long line with multiple inserted "\\\\\n" e.g.

10/15/2019 11:24AM:\\\\n<FN>74:10||4</FN> 74:10, FNID 4\\\\n<FN>13||4</FN> Surah 13, FNID 4\\\\n<FN>13||4|35</FN> Surah 13, FNID 4 aka ZFNID 35\\\\n\\\\nFN#		FNID within current Surah\\\\nS||FN#		FNID within Surah S\\\\nS:V||FN#		FNID within Surah:Verse S:V\\\\n\\\\nFN#|FN#		FNID|ZFNID within current Surah\\\\nS||FN#|FN#	FNID|ZFNID within Surah S\\\\nS:V||FN#|FN#	FNID|ZFNID within Surah:Verse S:V\\\\n\\\\nNOTE: Within the verse translations, Z replaces Jack's footnote references with their own e.g.\\\\nZ: "that.27"\\\\nJack:   "that.18"\\\\n\\\\nHowever, within the footnotes, Z retains Jack's footnote numbers but links to their Z footnote number e.g.\\\\n2:34 "... see sūrah 7, note 10."  Clicking on "10" opens footnote 939