Bug #40042 Wrong escape sequence on field comments
Submitted: 15 Oct 2008 11:18 Modified: 8 Feb 2010 11:46
Reporter: Gabriele Tozzi Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.25 OS:Windows
Assigned to: Alexander Musienko CPU Architecture:Any
Tags: CHECKED, escape backslash

[15 Oct 2008 11:18] Gabriele Tozzi
Description:
Hello,

when i create a field comment containing the sequence \', the resulting code is wrong.

How to repeat:
1. Create a new mysql workbench project
2. Add a table
3. Add a field in the table
4. Place the following text in the field's comment: "Test with \' test"
5. File -> Export -> Forward SQL Engineer Create Script...

The resulting script will contain:

`field_name` FIELD_TYPE NULL COMMENT 'Test with \\' test' , <--- Wrong  escape sequence in comment

The resulting comment should be instead: 'Test with \\\' test'

Thank you.

Suggested fix:
Check the function that adds escape characters to comment strings.
[15 Oct 2008 11:56] MySQL Verification Team
Thank you for the bug report.
[8 Feb 2010 11:46] Johannes Taxacher
This issue has been fixed in the latest released version of that product, which you can download at
http://www.mysql.com/downloads/