Bug #52798 Dumping Schema tables, views and stored routines doesn't dump stored routines.
Submitted: 14 Apr 2010 0:37 Modified: 4 Jun 2010 10:23
Reporter: Barry Galbraith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S3 (Non-critical)
Version:5.2.18 OS:Windows (XP Pro SP3)
Assigned to: Alexander Musienko CPU Architecture:Any
Tags: Dumping stored routines

[14 Apr 2010 0:37] Barry Galbraith
Description:
Dump a schema to seperate files.
Select all tables, select checkbox Views, select checkbox Dump stored routines.
The resulting files for tables are OK, one table per file.
The file labelled Views contains two tables, already in their own files.
SPs are not included anywhere.

How to repeat:
Dump a schema to seperate files.
Select all tables, select checkbox Views, select checkbox Dump stored routines.
The resulting files for tables are OK, one table per file.
The file labelled Views contains two tables, already in their own files.
SPs are not included anywhere.

Suggested fix:
Fix the "Dump Views" option to dump views, and make the "Stored Routines" option dump stored routines.
[14 Apr 2010 6:53] Valeriy Kravchuk
In my case I see stored routines dumped to dump_views.sql file. Please, check.
[14 Apr 2010 22:00] Barry Galbraith
Today, selecting all tables, and Dump Views checkbox, and Dump routines checkbox, I get a file for each table and a views file which contains EVERY table, and SPs.
[16 Apr 2010 14:44] MySQL Verification Team
Thank you for the feedback. Then the issue is solved?. Thanks in advance.
[16 Apr 2010 21:28] Barry Galbraith
I don't think it's solved.
Shouldn't the Views/Routines file NOT contain the tables, which are also in their own files?
[19 Apr 2010 7:40] Susanne Ebrecht
Many thanks for writing a bug report.
[21 Apr 2010 12:51] Johannes Taxacher
Hi Barry,

i tried to reproduce, but my schema_views.sql correctly contains the views and procedures. It does also contain create/drop commands for dummy-tables which are needed for proper creation the views/procedures later on in the file. 
Can you please verify that in your case really _every_ table create is contained again in the _views file or just the (expected) create/drop table commands for the view-tables?
thanks in advance.
[21 Apr 2010 21:23] Barry Galbraith
My schema doesn't contain any views, so there shouldn't be any temporary tables created.
But the views.sql file contains EVERY table along with it's data.
The Stored procedures are also in the views.sql file.
[26 Apr 2010 10:22] Sveta Smirnova
Johannes,

bug is only repeatable if schema contains no views. I.e. 3 tables and 1 function.
[28 May 2010 18:01] Johannes Taxacher
fix confirmed in repository
[4 Jun 2010 10:23] Tony Bedford
An entry has been added to the 5.2.22 changelog:

In the Data Dump section of the Administrator, when a schema was dumped to multiple files, the stored routines were not exported.