Bug #19458 Editing an existing Stored Procedure generates error code 1064
Submitted: 1 May 2006 18:07 Modified: 1 Dec 2006 18:59
Reporter: Ruud Litjens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.20 OS:Windows (Windows XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any
Tags: Source Editors

[1 May 2006 18:07] Ruud Litjens
Description:
Editing an existing stored procedure and then trying to execute it ends up with error code 1064 (syntax error) in line 4. I'm running the query browser on MySQL server 5.0.20-nt.

How to repeat:
When creating a new stored procedure (e.g. sp_test) this line looks like:

DELIMITER $$

DROP PROCEDURE IF EXISTS `cia`.`sp_test` $$
CREATE PROCEDURE `cia`.`sp_test` ()
BEGIN
  select 4;
END $$

DELIMITER ;

Closing the editing tab and reopening this procedure for editing again shows a different line 4.

DELIMITER $$

DROP PROCEDURE IF EXISTS `cia`.`sp_test` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_test`()
BEGIN
  select 4;
END $$

DELIMITER ;

Executing the stored procedure above gives error code 1064, after removing the DEFINER='root'@'locahost' part it works fine again.
[2 May 2006 12:41] MySQL Verification Team
Thank you for the bug report.
[12 Jun 2006 16:41] Ricardo Machado
Bug System...

When I try to restore a database (backed up by MySQL Administrator Tool) it gives me the same error as above...

I think that if I remove the DEFINER=`root`@`%` it will work...

In case you've already found out a solution... Please e-mail me ok?
[29 Nov 2006 9:48] Mike Lischke
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at

  http://www.mysql.com/downloads/
[1 Dec 2006 18:59] Ruud Litjens
Thanks for your effort.