Bug #52579 Export a schema with Dump Views puts whole schema in one file
Submitted: 4 Apr 2010 0:55 Modified: 20 Apr 2010 10:30
Reporter: Barry Galbraith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.17 OS:Windows (XP Pro SP3)
Assigned to: Alexander Musienko CPU Architecture:Any
Tags: Dump Views

[4 Apr 2010 0:55] Barry Galbraith
Description:
If you select the tables and Dump Views option, then each table is in a separate file, and ALL tables, and views are in the Views.sql file.

Select al tables, Dump Views and Dump Stored Routines, then all tables are in separate files, and ALL tables, views and SPs are in the Views.sql file.

Select tables and Dump Routines, then tables are in separate files, routines are in their own file, but the routines don't contain "/*!50003 DROP PROCEDURE IF EXISTS" statements.

How to repeat:
If you select the tables and Dump Views option, then each table is in a separate file, and ALL tables, and views are in the Views.sql file.

Select all tables, Dump Views and Dump Stored Routines, then all tables are in separate files, and ALL tables, views and SPs are in the Views.sql file.

Select tables and Dump Routines, then tables are in separate files, routines are in their own file, but the routines don't contain "/*!50003 DROP PROCEDURE IF EXISTS" statements.

There are no "Views" actually defined in the schema I'm dumping.

Suggested fix:
Repair Dump system to do what it says.
[4 Apr 2010 1:08] Barry Galbraith
Line 1173 of /modules/wb_admin_export.py

remove the "--skip-opt" option from the routine dumping command to allow DROP PROCEDURE IF EXISTS line to be dumped to the output file.
[4 Apr 2010 14:49] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[13 Apr 2010 0:56] Johannes Taxacher
fixed in repository
[20 Apr 2010 10:30] Tony Bedford
An entry has been added to the 5.2.18 changelog:

The Data Dump facility in the Administrator exported the entire schema into a single file when the Dump Views option was selected. Further, if tables were selected and the Dump stored routines option selected, the routines would be stored in their own file, but with the DROP PROCEDURE IF EXISTS statements missing.