Bug #52577 Import doesn't import Stored Procedures/Funtions file
Submitted: 3 Apr 2010 22:34 Modified: 19 Apr 2010 15:31
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: Contribution, SP/Routines.sql file is not imported

[3 Apr 2010 22:34] Barry Galbraith
Description:
The new routines.sql file is not imported.

How to repeat:
Dump a schema which has Stored Procedures and / or Funtions.
Select the check box to dump SPs/Functions.
Dump the Scheam to separate files.

Drop the schema.

On the Import tab, select the folder with the dump files.
Select schema name.
The log window shows a message /db_routines.sql does not contain schema/table information.
Select Import.

The tables are imported, the SPs are not imported.

Suggested fix:
Import SP/routines file.
[4 Apr 2010 0:59] Barry Galbraith
Change line 674 of modules/wb_admin_export py from
                elif line.startswith("/*!50001 VIEW") or line.startswith("/*!50003 CREATE*/ /*!50017 DEFINER="):

to                 elif line.startswith("/*!50001 VIEW") or line.startswith("/*!50003 CREATE*/ /*!50020 DEFINER="):

The routines file is now seen containing schema data.
[4 Apr 2010 14:59] Valeriy Kravchuk
Thank you for the bug report and solution suggested.
[12 Apr 2010 17:18] Johannes Taxacher
fixed in repository
[19 Apr 2010 15:31] Tony Bedford
An entry has been added to the 5.2.18 changelog:

During the import procedure of the Data Dump facility in the Administrator, stored routines were not imported.