Description:
When you have a stored procedure and stored function with the exact same name then it is not possible open the function with the "alter routine..." window.
Whenever you attempt to alter the function the the create code for the procedure is shown.
How to repeat:
1) Run this sql to create a procedure and function with the same name:
DELIMITER $$
CREATE PROCEDURE `test123` ()
BEGIN
SELECT "I am a stored routine";
END$$
CREATE FUNCTION `test123` () RETURNS VARCHAR(100)
BEGIN
RETURN "I am a stored function";
END$$
2) It can be verified that the correct sql for both routines was saved by running:
SHOW CREATE FUNCTION `test123`;
SHOW CREATE PROCEDURE `test123`;
3) Refresh the database treeview on the left of WB
4) Expend the routines section
5) now try to right click and "alter routine..." on the function
[The create code for the procedure is shown instead of the function]
PS.: functions is not alphabetical sorted in the list of "routines", they appear in the bottom of the list.
Suggested fix:
I have already (about 2 years ago) logged a feature request to split the stored procedures and functions into 2 separate categories. Such a logical split should also eliminate sorting issues and the "alter routine..." issues.
See my other feature request here:
See bug #56368.