Bug #70345 Workbench drops schema on source when updating model
Submitted: 14 Sep 2013 18:04 Modified: 26 Sep 2015 21:24
Reporter: Joe Brown Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S1 (Critical)
Version:5.2.47 OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[14 Sep 2013 18:04] Joe Brown
Description:
When updating a model and the model and connection are aware of more than one schema on the source (source database server), and you are updating model from source, you are prompted with "Schema not found, drop schema?" If you click "yes" the schema is dropped from the source even though the direction of update is from source to model. If you click "no" then the scenario repeats every time you update the model.

How to repeat:
Reverse engineer a live database.
Make the model aware of other databases on that connection (not sure how this happened).
Update the model from source.
Get prompt "Schema not found, drop schema?"
Click yes.
Schema is dropped from live server.

Suggested fix:
If direction of update is from source to model then nothing on the source should be altered, and the prompt should not appear.

Further the drop should only affect the model and connection, not the source. A schema drop should never be performed by workbench on a live server.
[19 Sep 2013 12:23] Lisa Ehrlinger
Hi Joe,
I wasn't able to reproduce this behaviour. Could you please provide more information about what WB Version and OS you use and the model you wanted to update?
[19 Sep 2013 18:17] Joe Brown
I think I might know a repro. After the model was initially created, somebody added a foreign key to a different database. When the model was synchronized again, the model became aware of the other database. The synchronize was not fully run, so that the new schema was not created. Upon subsequent sync's, the model started offering to drop the schema on the source server.

Here's my version info:

MySQL Workbench CE for Windows version 5.2.47  revision 10398
Data Directory: C:\Program Files (x86)\MySQL\MySQL Workbench 5.2 CE
Cairo Version: 1.8.8
OS: Microsoft Windows 7 Enterprise Edition Service Pack 1 (build 7601), 64-bit
CPU: 4x Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz, 7.7 GiB RAM
[26 Aug 2015 21:24] Miguel Solorzano
Please try version 6.3.4. Thanks.
[27 Sep 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".