• Vicențiu Ciorbaru's avatar
    MDEV-13676: Field "create Procedure" is NULL, even if the the user has role... · b9418ed3
    Vicențiu Ciorbaru authored
    MDEV-13676: Field "create Procedure" is NULL, even if the the user has role which is the definer. (SHOW CREATE PROCEDURE)
    
    During show create procedure we ommited to check the current role, if it
    is the actual definer of the procedure. In addition, we should support
    indirectly granted roles to the current role. Implemented a recursive
    lookup to search the tree of grants if the rolename is present.
    
    SQL Standard 2016, Part 5 Section 53 View I_S.ROUTINES selects
    ROUTINE_BODY and its WHERE clause says that the GRANTEE must be
    either PUBLIC, or CURRENT_USER or in the ENABLED_ROLES.
    b9418ed3
sp_head.cc 116 KB