Error in MySQL Workbench Forward Engineer Stored Procedures

Posted by colithium on Stack Overflow See other posts from Stack Overflow or by colithium
Published on 2010-05-28T08:56:44Z Indexed on 2010/05/28 9:02 UTC
Read the original article Hit count: 318

Filed under:
|

I am using MySQL Workbench (5.1.18 OSS rev 4456) to forward engineer a SQL CREATE script. For every stored procedure, the automatic process outputs something like:

DELIMITER //
USE DB_Name//
DB_Name//
DROP procedure IF EXISTS `DB_Name`.`SP_Name` //
USE DB_Name//
DB_Name//
CREATE PROCEDURE `DB_Name`.`SP_Name` (id INT)
BEGIN
    SELECT *
    FROM Table_Name
    WHERE Id = id;
END//

The two lines that are simply the database name followed by the delimiter are errors and are reported as such when running the script. As long as they are ignored, it looks like everything gets created just fine. But why would it add those lines?

I am creating the database in the WAMP environment which uses MySQL 5.1.36

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-workbench