• Vicențiu Ciorbaru's avatar
    MDEV-29465: Inherited columns privs for roles wrongly set mysql.tables_priv column · 145932a5
    Vicențiu Ciorbaru authored
    There was a bug in the ACL internal data structures GRANT_TABLE and
    GRANT_COLUMN. The semantics are: GRANT_TABLE::init_cols and
    GRANT_COLUMN::init_privs represent the bits that correspond to the
    privilege bits stored in the physical tables. The other struct members
    GRANT_TABLE::cols and GRANT_COLUMN::privs represent the actual access
    bits, as they may be modified through role grants.
    
    The error in logic was mixing the two fields and thus we ended up
    storing the logical access bits in the physical tables, instead of the
    physical (init_xxx) bits.
    
    This caused subsequent DBUG_ASSERT failures when dropping the involved
    roles.
    145932a5
roles_tables_priv-29465.test 1.04 KB