Bug #63157 Nothing happens when I click "Alter Routine" in the Workbench
Submitted: 8 Nov 2011 20:54 Modified: 13 Nov 2011 6:02
Reporter: Jennifer Marsh Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.2.35 CE OS:Windows (7 Professional)
Assigned to: CPU Architecture:Any

[8 Nov 2011 20:54] Jennifer Marsh
Description:
I am trying to open a routine to edit it. I right-click the procedure name in the left panel and in the details pane at the bottom and select "alter routine" and nothing happens. I can't see my stored procedures content, parameters or alter the routine at all.

How to repeat:
I am trying to open a routine to edit it. I right-click the procedure name in the left panel and in the details pane at the bottom and select "alter routine" and nothing happens. I can't see my stored procedures content, parameters or alter the routine at all.
[8 Nov 2011 21:28] Jennifer Marsh
I just realize why this is happening. I was receiving constant disconnects and uses phpmyadmin to create a procedure. If I create the procedure in the GUI Workbench, it works fine, but if I create a procedure in phpmyadmin, the GUI workbench does nothing when I try to use the alter statement.
[8 Nov 2011 21:55] MySQL Verification Team
I couldn't repeat on Windows 7 Ultimate with a simple procedure I created.
[9 Nov 2011 5:06] Valeriy Kravchuk
Please, send the definition of procedure (show create procedure ...\G results) from mysql command line client or phpmyadmin.
[9 Nov 2011 12:38] Jennifer Marsh
Here is my create procedure code. I changed the delimiter after reading another bug report that suggested it. This code was run in phpmyadmin and I could not use the alter routine in the GUI, making it impossible for me to see the procedure code. I had to delete the procedure and recreate it in the GUI, and now the alter procedure in the GUI works.

DELIMITER !!

CREATE PROCEDURE `database`.`table` `ins_newCustomer`(
IN fname varchar(30),
IN lname varchar(50),
IN address1 varchar(100),
IN address2 varchar(100),
IN city varchar(100),
IN state varchar(20),
IN country varchar(2),
IN zip varchar(10),
IN email varchar(100),
IN ordertype int,
IN digital_signature varchar(100),
IN representation varchar(100),
IN internal_rep varchar(20),
IN infringingurl varchar(250),
IN originalurl varchar(250),
IN comments varchar(2000),
IN cost decimal,
OUT linkguid char(36)
)
BEGIN

-- inserts the customer and creates a new record
insert into customer
(firstname, lastname, address1, address2, city, state, country, zip, email, digitalsignature)
values
(fname, lname, address1, address2, city, state, country, zip, email, digital_signature);

-- get the unique id and insert an order record
insert into order
(customerid, cost, order_type, agent, comments, infringing_url, original_url, internal_rep, orderguid)
values
(LAST_INSERT_ID(), cost, ordertype, representation, comments, infringingurl, originalurl, internal_rep, UUID());

-- return the uuid to the system to display the link
select orderguid into linkguid from order where orderid=LAST_INSERT_ID();

END
[9 Nov 2011 12:41] Jennifer Marsh
I need to amend my previous post. I was obfuscating the tables and database name, so the create procedure should say "database.procedure_name."
[13 Nov 2011 6:02] Alfredo Kojima
Your SP contains a reserved word used as a table name (order). Because of that I can't even
create the SP in MySQL 5.5 That's also the reason Workbench can't open it.
You should drop the SP and recreate it after escaping the order table with backticks (`order`)