• Davi Arnaut's avatar
    Bug#45100: Incomplete DROP USER in case of SQL_MODE = 'PAD_CHAR_TO_FULL_LENGTH' · 1ad80169
    Davi Arnaut authored
    The SQL-mode PAD_CHAR_TO_FULL_LENGTH could prevent a DROP USER
    statement from privileges associated with the user being dropped.
    What ocurred was that reading from the User and Host fields of
    the tables tables_priv or columns_priv would yield values padded
    with spaces, causing a failure to match a specified user or host 
    ('user' != 'user     ');
    
    The solution is to disregard the PAD_CHAR_TO_FULL_LENGTH mode
    when iterating over and matching values in the privileges tables
    for a DROP USER statement.
    1ad80169
sql_mode.result 12.6 KB