• Kristofer Pettersson's avatar
    Bug#44658 Create procedure makes server crash when user does not have ALL privilege · 8de6eb40
    Kristofer Pettersson authored
    MySQL crashes if a user without proper privileges attempts to create a procedure.
    
    The crash happens because more than one error state is pushed onto the Diagnostic
    area. In this particular case the user is denied to implicitly create a new user
    account with the implicitly granted privileges ALTER- and EXECUTE ROUTINE.
    
    The new account is needed if the original user account contained a host mask.
    A user account with a host mask is a distinct user account in this context.
    An alternative would be to first get the most permissive user account which
    include the current user connection and then assign privileges to that
    account. This behavior change is considered out of scope for this bug patch.
    
    The implicit assignment of privileges when a user creates a stored routine is a
    considered to be a feature for user convenience and as such it is not
    a critical operation. Any failure to complete this operation is thus considered
    non-f...
    8de6eb40
sql_parse.cc 232 KB