Bug #85229 Altering a stored procedure drops new name, not old
Submitted: 28 Feb 2017 13:35 Modified: 20 Mar 2018 23:46
Reporter: Jonathan Shyman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.3.10 OS:MacOS (10.12.2)
Assigned to: CPU Architecture:Any
Tags: rename, stored procedure

[28 Feb 2017 13:35] Jonathan Shyman
Description:
In Workbench, when altering a stored procedure and changing the name, the new name is dropped and then recreated. This is a change from how previous versions worked where the old name would be dropped and the procedure recreated with the new name, effectively serving as a way to rename a stored procedure

How to repeat:
1. Select "Alter Stored Procedure..." on a procedure
2. Change the name of the procedure
3. Click Apply.
4. Notice the DROP statement contains the NEW name, not the OLD name

Repeat this procedure in any version prior to 6.3.9 and you'll see the DROP statement contains the OLD name.

Suggested fix:
Restore previous behavior
[28 Feb 2017 13:37] Jonathan Shyman
The current functionality causes a new stored procedure to be created while the old one is left behind, creating a duplicate.
[28 Feb 2017 19:25] MySQL Verification Team
Thank you for the bug report. I was able to repeat on Windows version too, guess however is a duplicate of older bug it I wasn't able to find.
[19 Mar 2018 12:42] Jonathan Shyman
Also affects 6.3.10
[20 Mar 2018 23:46] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.11 release, and here's the changelog entry:

Using Alter Stored Procedure from the context menu to rename a stored
procedure did not remove the original stored procedure after renaming it.

Thank you for the bug report.