Bug #51657 Reverse engineer fails to get comments correctly
Submitted: 2 Mar 2010 20:55 Modified: 11 Apr 2010 7:39
Reporter: Byron Palmer Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Workbench: Modeling Severity:S3 (Non-critical)
Version:5.2.16 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: comment, modeling, reverse engineer

[2 Mar 2010 20:55] Byron Palmer
When reverse engineering a table, some of the comments do not come over correctly.
The resulting model has comments beginning with ' and dropping the last character.

How to repeat:
Reverse engineer a database with table and column comments.

Suggested fix:
Parsing of comments in the text is not correct. I would guess that the index into the string is off by one. This should be an easy fix.
[3 Mar 2010 4:23] Valeriy Kravchuk
Please, send CREATE TABLE for some table with comments that demonstrates the problem.
[3 Mar 2010 18:09] Byron Palmer
Table as built in the database

Attachment: csi real.sql (application/octet-stream, text), 1.59 KiB.

[3 Mar 2010 18:10] Byron Palmer
Table from reserve engineering

Attachment: csi bad.sql (application/octet-stream, text), 1.81 KiB.

[3 Mar 2010 18:10] Byron Palmer
I have uploaded the original script from the database along with the reverse engineered script from the database.

As can be seen, the leading ' is captured and the last character is dropped. My guess is that in the parsing of the show create table command the location in the string of the comments is off by one. I have done this so often that it appears obvious to me when I see it. Hope this helps.
[4 Mar 2010 12:30] Susanne Ebrecht
Many thanks for writing a bug report.

This looks more like a connectors bug then a Workbench bug.
[4 Mar 2010 13:20] Susanne Ebrecht
Verified as described you will get '\' and the will get cut.
[4 Mar 2010 13:20] Valeriy Kravchuk
Maybe connector is the reason, but for now (IMHO) this is an easily repeatable and thus verified bug in MySQL Workbench 5.2.16.
[11 Apr 2010 7:39] Sergei Tkachenko
This is fixed along with bug #51972.