Bug #32885 Import from SQL script does not recreate views, functions and stored procedures
Submitted: 30 Nov 2007 22:01 Modified: 6 Feb 2008 16:09
Reporter: Nicolas Laplante Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.10 Beta OS:Windows
Assigned to: Sergei Tkachenko CPU Architecture:Any
Tags: beta, FUNCTION, import, PROCEDURE, script, SQL, VIEW, workbench

[30 Nov 2007 22:01] Nicolas Laplante
Description:
I have exported a backup SQL script from MySQL Administrator. This script contains numerous views, functions and stored procedures.

When I import the SQL script, only tables are created. Each view is created as a table in the resulting model. Stored procedures and functions are not created.

How to repeat:
- Export SQL backup script from MySQL Administrator (latest)
- Reverse engineer MySQL Create Script (File -> Import... menu)

Suggested fix:
Properly create views, stored procedures and functions when reverse engineering SQL script
[2 Dec 2007 12:35] Sveta Smirnova
Thank you for the report.

Verified as described using database sakila.

But reclassified as documentation bug, because MySQL Administrator creates incompatible with other clients dump.

I believe incompatibility with MySQL Workbench should be documented.
[10 Dec 2007 19:23] Sergei Tkachenko
Fixed. Now mysqldump file can be imported as is.
[9 Jan 2008 17:39] Sergei Tkachenko
In case of importing raw mysqldump file tables where created instead of views. Reason for this: mysqldump file contains `create table` statements corresponding to each view for its internal purposes. Now parser changed to ignore such aux statements. Fix wil be incorporated in v5.0.12.
[5 Feb 2008 12:51] Johannes Taxacher
views aren't created when importing from MySQL-Administrator because of missing drop-support
[5 Feb 2008 15:33] Sergei Tkachenko
My fault, tested on SQL dump file from other tool than MySQL Administrator. Finally had to add support of drop statements.
[6 Feb 2008 16:09] Johannes Taxacher
works as expected now in SVN Rev 2528