Bug #113018 EER Diagram becomes corrupt after using reverse engineering into existing schema
Submitted: 9 Nov 2023 8:06 Modified: 21 Nov 2023 12:43
Reporter: Erik Lemcke Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S2 (Serious)
Version:8.0.34 OS:MacOS (Ventura 13.3.1(a))
Assigned to: CPU Architecture:Any

[9 Nov 2023 8:06] Erik Lemcke
Description:
I’m using Mysql workbench 8.0.34 on MacOs Ventura 13.3.1(a)

I’ve noticed that when I create a EER Diagram, manually add tables to it and then use reverse engineering to add tables to the same schema, the diagram becomes corrupt when I reopen it. I first get a error like:

The model in file '/Users/erik/Desktop/test.mwb' contained a problem which was successfully recovered:
Table figure test2 is not attached to any database table and was deleted.

After that error, all tables that where present before reverse engineering are gone.
In this example, test2 was the table I added manually before reverse engineering.

How to repeat:
Steps to reproduce:

Create a schema and a table:
CREATE SCHEMA TestDb;

USE TestDb;

CREATE TABLE test1 (
    kol1 INTEGER
)

Create a new EER diagram and manually add a table, called test2
Go to the “MySQL Model” tab and rename the scheme below “Physical Schemas” to “TestDb”

Choose Database -> Reverse engineer
Choose the test1 table and finish the wizard

If you go to the “MySQL Model” tab in mysql workbench, a first issue is already visible, the tabs below “Physical Schemas” now have empty labels

Save the diagram and close mysql workbench.

Reopen Mysql workbench and the EER Diagram, you will see the following error:

The model in file '/Users/erik/Desktop/corruption test.mwb' contained a problem which was successfully recovered: Table figure test2 is not attached to any database table and was deleted.

The result is that the table test2 is now gone from the diagram

Suggested fix:
Using the reverse engineering wizard should not have a impact on existing tables in the diagram, I would expect it to just add the new tables, but it seems to remove the existing tables from the tables shown in “Physical Schemas”
[9 Nov 2023 8:09] Erik Lemcke
Screenshot of empty tabs at "Physical Schemas"

Attachment: empty tabs.png (image/png, text), 9.99 KiB.

[21 Nov 2023 12:43] MySQL Verification Team
Hello Erik Lemcke,

Thank you for the bug report.
I tried to reproduce your issue on a Mac with workbench 8.0.34 but not seeing any issues at my end. If you can provide more information, feel free to add it to this bug. Thanks.

Regards,
Ashwini Patil