Bug #48028 Export MySQL Routine Objects genetartes invalid line
Submitted: 13 Oct 2009 18:52 Modified: 19 Oct 2009 12:33
Reporter: Borut Ražem Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.1.18 OSS OS:Windows
Assigned to: CPU Architecture:Any

[13 Oct 2009 18:52] Borut Ražem
Description:
MySQL Worbwnch gwnwrates invalid line at the beginning of each routine when exporting routines with "Export MySQL Routine Objects". The line looks like:

<dbname>//

where <dbname> is database name.

How to repeat:
Create a procedure and export it with Export MySQL Routine Objects to a file.
The file looks like:

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 SCHEMA IF NOT EXISTS `dbcert` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ;
USE `dbcert`;

DELIMITER //
USE dbcert//
dbcert//
DROP procedure IF EXISTS `dbcert`.`update_map` //
USE dbcert//
dbcert//
CREATE PROCEDURE `dbcert`.`update_map` (
...

there is an ivalid line dbcert// between USE dbcert// and DROP procedure IF EXISTS.

This sequence is repeated for each procedure and function.

Suggested fix:
Remove the generation of invalid lines.
I removed them by hand from the generated file and successfully imported the routines to MySQL.
[13 Oct 2009 19:00] Peter Laursen
I am 100% sure that there is at least one more report with this.

Peter
(not a MySQL person)
[19 Oct 2009 12:33] Johannes Taxacher
this is a duplicate of Bug #39929