Bug #45456 Synchronize Model is destructive when updating model

Submitted: 11 Jun 2009 15:50 Modified: 10 Aug 2009 12:26
Reporter: Yvan Rodrigues Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.1.12, 5.1.16 OS:Windows
Assigned to: Alexander Musienko CPU Architecture:Any
Tags: CHECKED, drop schema synchronize model delete erase

[11 Jun 2009 15:50] Yvan Rodrigues
Description:
This could be a misunderstanding of the synchronize functionality. If I have an empty model and I choose Database | Synchronize, choose a schema to sync, then choose a schema and objects and select the "Update Model" mode, I wouldn't expect the source schema to be dropped from the server; that would be expected if "Update Source" was chosen.

How to repeat:
Create a new model. Go to Database | Synchronize. Select a schema. In the "Select Changes to Apply" sub-dialog, set all objects to "Update Model" and click next. The resulting code in "Review DB Changes" are destructive and might look like:

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
DROP SCHEMA IF EXISTS `enumerate_bug` ;
DELIMITER //
DROP procedure IF EXISTS `enumerate_bug`.`foo_sp1` //
DROP procedure IF EXISTS `enumerate_bug`.`foo_sp10` //
DROP procedure IF EXISTS `enumerate_bug`.`foo_sp100` //
DROP procedure IF EXISTS `enumerate_bug`.`lookup` //
DELIMITER ;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Suggested fix:
Source should only be affected when Update Source is chosen?
[30 Jun 2009 22:48] Yvan Rodrigues
Related to 42149?
[8 Jul 2009 9:00] Valeriy Kravchuk
Thank you for the problem report. I see the same (wrong!) behaviour of Update Model even in recent 5.1.16.
[6 Aug 2009 20:36] Johannes Taxacher
this has been corrected. fix will be included in 5.1.17
[10 Aug 2009 12:26] Tony Bedford
An entry was added to the 5.1.17 changelog:

When synchronizing a model with a live database, clicking the Update Model actually caused the server to be updated as if Update Source had been clicked.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.