WL#2646: INFORMATION_SCHEMA.ROUTINE_PRIVILEGES view

Affects: Server-7.1   —   Status: Un-Assigned   —   Priority: Very High

Now that WL#173 "Create Data Dictionary Tables for SHOW commands" is done,    
after WL#925 "EXECUTE privilege" is done,    
we will want a new metadata view: INFORMATION_SCHEMA.ROUTINE_PRIVILEGES.   
 
I think the table should have these columns:    
    
Standard name                 Remarks    
-------------                 -------    
GRANTOR                       omit  
GRANTEE                       e.g. 'user'@'host'  
SPECIFIC_CATALOG              NULL  
SPECIFIC_SCHEMA               as in ROUTINES.ROUTINE_CATALOG  
SPECIFIC_NAME                 as in ROUTINES.SPECIFIC_NAME  
PRIVILEGE_TYPE                always "EXECUTE"  
IS_GRANTABLE                  as in TABLE_PRIVILEGES.IS_GRANTABLE  
ROUTINE_TYPE                  as in ROUTINES.ROUTINE_TYPE  
  
The last column, ROUTINE_TYPE, is non-standard but I guess  
we must have some way to know whether the grant was on a  
function or on a stored procedure.  
    
For example:    
After    
"  
GRANT EXECUTE ON FUNCTION f TO pierre  
"  
    
There is a row in INFORMATION_SCHEMA.ROUTINE_PRIVILEGES with    
  
Standard name                 Remarks    
-------------                 -------    
GRANTEE                       'pierre'@'%'  
SPECIFIC_CATALOG              NULL  
SPECIFIC_SCHEMA               d  
SPECIFIC_NAME                 f  
PRIVILEGE_TYPE                EXECUTE  
IS_GRANTABLE                  NO  
ROUTINE_TYPE                  FUNCTION  
  
See also: WL#1996 "TRIGGERS view", WL#2003 "PARAMETERS view", WL#2257  
"REFERENTIAL_CONSTRAINTS view".  

Feature requests:
BUG#26886  	No ROUTINE_PRIVILEGES table in INFORMATION_SCHEMA

"ROUTINE_PRIVILEGES implementation" blog posting by Shlomi Noach
http://code.openark.org/blog/mysql/routine_privileges-implementation