Bug #32578 Forward Engineer ignores de-selected database objects
Submitted: 21 Nov 2007 15:53 Modified: 20 Feb 2008 14:37
Reporter: marc castrovinci (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.09 SE BETA OS:Windows (XP SP2)
Assigned to: CPU Architecture:Any
Tags: database, deselect, forward engineer, IGNORE, object, qc, SELECT

[21 Nov 2007 15:53] marc castrovinci
Description:
If you try to forward engineer and tell it not to use tables or stored procedures, the script at the end still contains the information.

How to repeat:
1. Open Workbench using the attached save file. ( bug_forwardengineer.mwb )
2. Click on Database>Forward Engineer
3. UNCHECK both boxes for Tables and Routines.
4. Click next twice till you see the SQL Script.
   
You still see the objects you told Workbench not to use.

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';

CREATE DATABASE IF NOT EXISTS `mydb` DEFAULT CHARACTER SET latin1 ;
USE `mydb`;

-- -----------------------------------------------------
-- Table `mydb`.`mytable1`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mydb`.`mytable1` () ;

-- -----------------------------------------------------
-- Table `mydb`.`mytable2`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `mydb`.`mytable2` () ;

DELIMITER //
CREATE PROCEDURE `mydb`.`myroutine1` ()
BEGIN
  select now() from dual;
END//
CREATE PROCEDURE `mydb`.`myroutine2` ()
BEGIN
  select curdate() from dual;
END//

DELIMITER ;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Now if you go and just test the checkbox functionality with Reverse Engineering, it works correctly. Whatever you uncheck is ignored.

The only way to truly have it ignore the object is to go into the list and move everything over to ignore.

Suggested fix:
Ignore the objects when unchecked. Might be a listener problem.
[21 Nov 2007 15:54] marc castrovinci
Sample setup to show bug.

Attachment: bug_forwardengineer.mwb (application/octet-stream, text), 2.69 KiB.

[21 Nov 2007 15:58] marc castrovinci
Also ignores Users.
[21 Nov 2007 23:39] MySQL Verification Team
Thank you for the bug report.
[19 Feb 2008 15:44] Johannes Taxacher
fixed in 5.0.13 SVN Rev 2579
[20 Feb 2008 14:37] Peter Lavin
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
Added to the changelog.