So, the initial problem was, in MySQL Workbench, I tried to Alter Procedure and got nothing. No error, just nothing happened. This turns out to be that despite having full permissions for the schema because the definer on the stored procedure is not me, I can't view it's source code.
Scenario:
Database: Bugs
Users: A, B
Permissions:
grant all privileges on bugs.* to 'A'@'%'
grant all privileges on bugs.* to 'B'@'%'
User A creates a stored procedure
create procedure user_A_procedure ...
We now have a procedure user_A_prodecure who's definer is set to A@%
with security_type set to DEFINER
mysql> SHOW PROCEDURE STATUS\G
Db: bugs
Name: user_A_prodecure
Type: PROCEDURE
Definer: A@%
Modified: 2018-10-26 10:30:06
Created: 2018-10-26 10:30:06
Security_type: DEFINER
Comment:
character_set_client: utf8 collation_connection: utf8_general_ci Database Collation: utf8_general_ci
The problem is, user B want's to be able to edit the procedure (they don't have access to the original source) but they can't. In MySQL Workbench nothing happens when they try and Alter Procedure, at command prompt they can't see the source code
mysql> SHOW CREATE PROCEDURE user_A_procedure
Procedure: user_A_procedure
sql_mode:
Create Procedure: NULL
character_set_client: utf8
collation_connection: utf8_general_ci
Database Collation: utf8_general_ci
This does not return the source code as it would if it was user A executing it, instead it returns NULL.
It turns out that to use MySQL Workbench or SHOW CREATE PROCEDURE to see another definer's stored procedure, the user has to be given GLOBAL SELECT permission [1].
GLOBAL SELECT gives the user the ability to read everything in every database and is NOT a desirable option.
So my question is: How can I allow user A to see/alter user B's procedure without giving them GLOBAL SELECT permission?
References: