Bug #38236 Forward Engineer SQL Alter Script Procedure - two similarlly named tables
Submitted: 19 Jul 2008 2:45 Modified: 3 Aug 2008 4:29
Reporter: Graham O'Neale Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.23 OSS Rev. 3198 OS:Windows (Vista)
Assigned to: CPU Architecture:Any
Tags: workbench synchronization alterscript

[19 Jul 2008 2:45] Graham O'Neale
Description:
Hi There,

I have been working on a EER Diagram for some time now and have found a few quirks with the 'Forward Engineer SQL ALTER Script' procedure.

My latest finding which I feel I should draw your attention to as it may be a potential issue is in how the export procedure comparison between the input script and the DB diagram.

Graham O'Neale

How to repeat:
I can't attach a screenshot so I will do my best to explain.

I have an already existing table in the EER Diagram named 'member_statuses' and I have now newly created two new tables since my last alter synchronization and these are called 'member_subscriptions' and 'member_subscription_statuses'.  When I attempt to run an alter script export it does not generate the new CREATE TABLE SQL for the new 'member_subscription_statuses' table.  When I have a look at the comparison grid (SQL Diff Tree), it appears that it compared 'member_statuses' to 'member_subscription_statuses' thinking that they were the same table and subsequently reported no changes.

Suggested fix:
More diligant comparison checking when comaparing previous input file to EER visual diagram.
[19 Jul 2008 2:48] Graham O'Neale
SQL Diff Tree screenshot displaying problem

Attachment: diff-tree.gif (image/gif, text), 24.86 KiB.

[19 Jul 2008 2:49] Graham O'Neale
OK I could attach a screenshot after all, please see file with Diff Tree displaying problem.

Also is there a workaround I can use to retrieve my 'CREATE TABLE' script I need from Workbench for my new table?
[19 Jul 2008 5:33] Valeriy Kravchuk
Thank you for a problem report. Looks like we need your original diagram and description of exact actions to add these 2 new tables to repeat the problem. My attempts to repeat it were unsuccessfull so far.
[20 Jul 2008 1:58] Graham O'Neale
I can't re-create this problem now either, and I have since deleted any columns that appeared to be correlated with this problem and since re-added them which appears to have fixed the issue.

Obviously from the screenshot it thought it had some relation to compare against the other table, but I just don't know what it was.
[24 Jul 2008 0:16] MySQL Verification Team
Thank you for the feedback. Could you please comment here to re-open this bug report if you are able to provide step by step test case. Thanks in advance.
[25 Jul 2008 11:56] Graham O'Neale
Hi Miguel,

I have came across the problem again, and I believe it occurs when I perform a COPY+PASTE from an existing table and rename it as a new table.

HOW TO REPEAT:
If you perform an SQL Alter Procedure and use the 'zeta_workbench.sql' as the import file you will notice that two new tables which -should- be displayed as a difference and include a "CREATE TABLE" statement does not.
The two new tables which were copy+pasted and do not exist in the SQL but exist in the diagram are:
- game_server_event
- game_server_event_type

You will notice in the diff tree they appear on the left, but not on the right.

Graham

(I also cannot re-open this bug, I only have 'can't repeat' and 'closed' available as statuses)
[3 Aug 2008 4:29] Graham O'Neale
Hi there, 

Can this bug be re-opened?