• Brandon Nesterenko's avatar
    MDEV-28294: set default role bypasses Replicate_Wild_Ignore_Table: mysql.% · 8963d64e
    Brandon Nesterenko authored
    Problem:
    ========
    When replicating SET DEFAULT ROLE, the pre-update check (i.e. that
    in set_var_default_role::check()) tries to validate the existence of
    the given rules/user even when the targeted tables are ignored. When
    previously issued CREATE USER/ROLE commands are ignored by the
    replica because of the replication filtering rules, this results in
    an error because the targeted data does not exist.
    
    Solution:
    ========
    Before checking that the given roles/user exist of a SET DEFAULT
    ROLE command, first ensure that the mysql.user and
    mysql.roles_mapping tables are not excluded by replication filters.
    
    Reviewed By:
    ============
    Andrei Elkin <andrei.elkin@mariadb.com>
    Sergei Golubchik <serg@mariadb.com>
    8963d64e
sql_acl.cc 427 KB