Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28294

set default role bypasses Replicate_Wild_Ignore_Table: mysql.%

Details

    Description

      Replicate_Wild_Ignore_Table: mysql.% can't make bypass SET DEFAULT ROLE '<role>' FOR 'user';

      On master

      MariaDB [(none)]> create user testuser@'%';
      Query OK, 0 rows affected (0.002 sec)
       
      MariaDB [(none)]> CREATE ROLE journalist;
      Query OK, 0 rows affected (0.002 sec)
       
      MariaDB [(none)]> grant journalist to testuser@'%';
      Query OK, 0 rows affected (0.001 sec)
       
      MariaDB [(none)]> select * from mysql.roles_mapping;
      +-----------+----------+-----------------------+--------------+
      | Host      | User     | Role                  | Admin_option |
      +-----------+----------+-----------------------+--------------+
      | localhost | root     | role_workflow_portals | Y            |
      | localhost | root     | journalist            | Y            |
      | %         | testuser | journalist            | N            |
      +-----------+----------+-----------------------+--------------+
      3 rows in set (0.001 sec)
       
      MariaDB [(none)]> SET DEFAULT ROLE journalist for testuser@'%';
      Query OK, 0 rows affected (0.001 sec)
      

      on slave:

      MariaDB [(none)]> show slave status\G
      *************************** 1. row ***************************
                      Slave_IO_State: Waiting for master to send event
                         Master_Host: 192.168.254.14
                         Master_User: repl
                         Master_Port: 3306
                       Connect_Retry: 60
                     Master_Log_File: m2-bin.000005
                 Read_Master_Log_Pos: 1077
                      Relay_Log_File: mariadb-relay-bin.000002
                       Relay_Log_Pos: 1220
               Relay_Master_Log_File: m2-bin.000005
                    Slave_IO_Running: Yes
                   Slave_SQL_Running: No
                     Replicate_Do_DB: 
                 Replicate_Ignore_DB: 
                  Replicate_Do_Table: 
              Replicate_Ignore_Table: 
             Replicate_Wild_Do_Table: 
         Replicate_Wild_Ignore_Table: mysql.%
                          Last_Errno: 1959
                          Last_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
                        Skip_Counter: 0
                 Exec_Master_Log_Pos: 924
                     Relay_Log_Space: 1684
                     Until_Condition: None
                      Until_Log_File: 
                       Until_Log_Pos: 0
                  Master_SSL_Allowed: No
                  Master_SSL_CA_File: 
                  Master_SSL_CA_Path: 
                     Master_SSL_Cert: 
                   Master_SSL_Cipher: 
                      Master_SSL_Key: 
               Seconds_Behind_Master: NULL
       Master_SSL_Verify_Server_Cert: No
                       Last_IO_Errno: 0
                       Last_IO_Error: 
                      Last_SQL_Errno: 1959
                      Last_SQL_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
         Replicate_Ignore_Server_Ids: 
                    Master_Server_Id: 3
                      Master_SSL_Crl: 
                  Master_SSL_Crlpath: 
                          Using_Gtid: Slave_Pos
                         Gtid_IO_Pos: 3-3-5,0-3-2
             Replicate_Do_Domain_Ids: 
         Replicate_Ignore_Domain_Ids: 
                       Parallel_Mode: optimistic
                           SQL_Delay: 0
                 SQL_Remaining_Delay: NULL
             Slave_SQL_Running_State: 
                    Slave_DDL_Groups: 5
      Slave_Non_Transactional_Groups: 0
          Slave_Transactional_Groups: 0
      

      MTR test case for reproducing

      source include/master-slave.inc;
       
      call mtr.add_suppression("Slave: Invalid role specification `journalist` Error_code: 1959");
       
      connection master;
      SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
       
      connection slave;
      source include/stop_slave.inc;
      SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
      source include/start_slave.inc;
       
      connection master;
      CREATE ROLE journalist;
      CREATE USER testuser@localhost IDENTIFIED by '';
       
      GRANT journalist to testuser@localhost;
       
      SELECT  * from mysql.roles_mapping;
       
      SET DEFAULT ROLE journalist for testuser@localhost;
       
      connection slave;
      --let $slave_sql_errno= 1959
      --let $slave_timeout=5
      source include/wait_for_slave_sql_error.inc;
       
      let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
      --echo Last_SQL_Error = $error
      let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
      --echo Last_SQL_Errno = $errno
      let $repl_wild_filter= query_get_value(SHOW SLAVE STATUS, Replicate_Wild_Ignore_Table, 1);
      --echo Replicate_Wild_Ignore_Table = $repl_wild_filter
       
      # Clean up
      source include/stop_slave_io.inc;
      SET @@GLOBAL.replicate_wild_ignore_table="";
      RESET SLAVE;
      --let $rpl_only_running_threads= 1
       
      connection master;
      SET @@GLOBAL.replicate_wild_ignore_table="";
      DROP ROLE journalist;
      DROP USER testuser@localhost;
       
      --source include/rpl_end.inc
      

      Reproduced with:
      10.2 9b2d36660bbb4f93c6b9e0761c91d57d47f59196
      10.3 b208030ef5b4274fd66cc9667a2dc96f6e63db81
      10.4 d16c3aca3c3ecd1050b2527c213f4fdf1959d9e2
      10.5 1a66e3f861a722689a39f83919d1f1a5466f64bf
      10.6 cad792c6862546a13b83f05209e7842a95bdc5fa
      10.7 9e314fcf6e666ce6fdbdd8ca1ae23d6c4b389b21
      10.8 6948abb94c6739101320d12ddec1d2daae929cc2
      10.9 72a125058527126ae31c02851db0d1ca186706f7

      Attachments

        Activity

          allen.lee@mariadb.com Allen Lee (Inactive) created issue -
          julien.fritsch Julien Fritsch made changes -
          Field Original Value New Value
          Fix Version/s 10.6 [ 24028 ]
          julien.fritsch Julien Fritsch made changes -
          Assignee Andrei Elkin [ elkin ]
          julien.fritsch Julien Fritsch made changes -
          Assignee Andrei Elkin [ elkin ] Allen Lee [ allen.lee@mariadb.com ]
          Status Open [ 1 ] Needs Feedback [ 10501 ]
          allen.lee@mariadb.com Allen Lee (Inactive) made changes -
          Assignee Allen Lee [ allen.lee@mariadb.com ] Angelique Sklavounos [ JIRAUSER50741 ]
          allen.lee@mariadb.com Allen Lee (Inactive) made changes -
          Status Needs Feedback [ 10501 ] Open [ 1 ]
          julien.fritsch Julien Fritsch made changes -
          Status Open [ 1 ] Confirmed [ 10101 ]
          angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
          Affects Version/s 10.2 [ 14601 ]
          Affects Version/s 10.3 [ 22126 ]
          Affects Version/s 10.4 [ 22408 ]
          Affects Version/s 10.5 [ 23123 ]
          Affects Version/s 10.7 [ 24805 ]
          Affects Version/s 10.8 [ 26121 ]
          Affects Version/s 10.9 [ 26905 ]
          angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
          Description Replicate_Wild_Ignore_Table: mysql.% can't make bypass *SET DEFAULT ROLE '<role>' FOR 'user';*

          On master
          {code:java}
          MariaDB [(none)]> create user testuser@'%';
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> CREATE ROLE journalist;
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> grant journalist to testuser@'%';
          Query OK, 0 rows affected (0.001 sec)

          MariaDB [(none)]> select * from mysql.roles_mapping;
          +-----------+----------+-----------------------+--------------+
          | Host | User | Role | Admin_option |
          +-----------+----------+-----------------------+--------------+
          | localhost | root | role_workflow_portals | Y |
          | localhost | root | journalist | Y |
          | % | testuser | journalist | N |
          +-----------+----------+-----------------------+--------------+
          3 rows in set (0.001 sec)

          MariaDB [(none)]> SET DEFAULT ROLE journalist for testuser@'%';
          Query OK, 0 rows affected (0.001 sec)
          {code}

          on slave:

          {code:java}
          MariaDB [(none)]> show slave status\G
          *************************** 1. row ***************************
                          Slave_IO_State: Waiting for master to send event
                             Master_Host: 192.168.254.14
                             Master_User: repl
                             Master_Port: 3306
                           Connect_Retry: 60
                         Master_Log_File: m2-bin.000005
                     Read_Master_Log_Pos: 1077
                          Relay_Log_File: mariadb-relay-bin.000002
                           Relay_Log_Pos: 1220
                   Relay_Master_Log_File: m2-bin.000005
                        Slave_IO_Running: Yes
                       Slave_SQL_Running: No
                         Replicate_Do_DB:
                     Replicate_Ignore_DB:
                      Replicate_Do_Table:
                  Replicate_Ignore_Table:
                 Replicate_Wild_Do_Table:
             Replicate_Wild_Ignore_Table: mysql.%
                              Last_Errno: 1959
                              Last_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
                            Skip_Counter: 0
                     Exec_Master_Log_Pos: 924
                         Relay_Log_Space: 1684
                         Until_Condition: None
                          Until_Log_File:
                           Until_Log_Pos: 0
                      Master_SSL_Allowed: No
                      Master_SSL_CA_File:
                      Master_SSL_CA_Path:
                         Master_SSL_Cert:
                       Master_SSL_Cipher:
                          Master_SSL_Key:
                   Seconds_Behind_Master: NULL
           Master_SSL_Verify_Server_Cert: No
                           Last_IO_Errno: 0
                           Last_IO_Error:
                          Last_SQL_Errno: 1959
                          Last_SQL_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
             Replicate_Ignore_Server_Ids:
                        Master_Server_Id: 3
                          Master_SSL_Crl:
                      Master_SSL_Crlpath:
                              Using_Gtid: Slave_Pos
                             Gtid_IO_Pos: 3-3-5,0-3-2
                 Replicate_Do_Domain_Ids:
             Replicate_Ignore_Domain_Ids:
                           Parallel_Mode: optimistic
                               SQL_Delay: 0
                     SQL_Remaining_Delay: NULL
                 Slave_SQL_Running_State:
                        Slave_DDL_Groups: 5
          Slave_Non_Transactional_Groups: 0
              Slave_Transactional_Groups: 0
          {code}



          Replicate_Wild_Ignore_Table: mysql.% can't make bypass *SET DEFAULT ROLE '<role>' FOR 'user';*

          On master
          {code:java}
          MariaDB [(none)]> create user testuser@'%';
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> CREATE ROLE journalist;
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> grant journalist to testuser@'%';
          Query OK, 0 rows affected (0.001 sec)

          MariaDB [(none)]> select * from mysql.roles_mapping;
          +-----------+----------+-----------------------+--------------+
          | Host | User | Role | Admin_option |
          +-----------+----------+-----------------------+--------------+
          | localhost | root | role_workflow_portals | Y |
          | localhost | root | journalist | Y |
          | % | testuser | journalist | N |
          +-----------+----------+-----------------------+--------------+
          3 rows in set (0.001 sec)

          MariaDB [(none)]> SET DEFAULT ROLE journalist for testuser@'%';
          Query OK, 0 rows affected (0.001 sec)
          {code}

          on slave:

          {code:java}
          MariaDB [(none)]> show slave status\G
          *************************** 1. row ***************************
                          Slave_IO_State: Waiting for master to send event
                             Master_Host: 192.168.254.14
                             Master_User: repl
                             Master_Port: 3306
                           Connect_Retry: 60
                         Master_Log_File: m2-bin.000005
                     Read_Master_Log_Pos: 1077
                          Relay_Log_File: mariadb-relay-bin.000002
                           Relay_Log_Pos: 1220
                   Relay_Master_Log_File: m2-bin.000005
                        Slave_IO_Running: Yes
                       Slave_SQL_Running: No
                         Replicate_Do_DB:
                     Replicate_Ignore_DB:
                      Replicate_Do_Table:
                  Replicate_Ignore_Table:
                 Replicate_Wild_Do_Table:
             Replicate_Wild_Ignore_Table: mysql.%
                              Last_Errno: 1959
                              Last_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
                            Skip_Counter: 0
                     Exec_Master_Log_Pos: 924
                         Relay_Log_Space: 1684
                         Until_Condition: None
                          Until_Log_File:
                           Until_Log_Pos: 0
                      Master_SSL_Allowed: No
                      Master_SSL_CA_File:
                      Master_SSL_CA_Path:
                         Master_SSL_Cert:
                       Master_SSL_Cipher:
                          Master_SSL_Key:
                   Seconds_Behind_Master: NULL
           Master_SSL_Verify_Server_Cert: No
                           Last_IO_Errno: 0
                           Last_IO_Error:
                          Last_SQL_Errno: 1959
                          Last_SQL_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
             Replicate_Ignore_Server_Ids:
                        Master_Server_Id: 3
                          Master_SSL_Crl:
                      Master_SSL_Crlpath:
                              Using_Gtid: Slave_Pos
                             Gtid_IO_Pos: 3-3-5,0-3-2
                 Replicate_Do_Domain_Ids:
             Replicate_Ignore_Domain_Ids:
                           Parallel_Mode: optimistic
                               SQL_Delay: 0
                     SQL_Remaining_Delay: NULL
                 Slave_SQL_Running_State:
                        Slave_DDL_Groups: 5
          Slave_Non_Transactional_Groups: 0
              Slave_Transactional_Groups: 0
          {code}


          *MTR test case for reproducing*
          {code:sql}
          source include/master-slave.inc;
           
          call mtr.add_suppression("Slave: Invalid role specification `journalist` Error_code: 1959");
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
           
          connection slave;
          source include/stop_slave.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
          source include/start_slave.inc;
           
          connection master;
          CREATE ROLE journalist;
          CREATE USER testuser@localhost IDENTIFIED by '';
           
          GRANT journalist to testuser@localhost;
           
          SELECT * from mysql.roles_mapping;
           
          SET DEFAULT ROLE journalist for testuser@localhost;
           
          connection slave;
          --let $slave_sql_errno= 1959
          --let $slave_timeout=5
          source include/wait_for_slave_sql_error.inc;
           
          let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
          --echo Last_SQL_Error = $error
          let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
          --echo Last_SQL_Errno = $errno
          let $repl_wild_filter= query_get_value(SHOW SLAVE STATUS, Replicate_Wild_Ignore_Table, 1);
          --echo Replicate_Wild_Ignore_Table = $repl_wild_filter
           
          # Clean up
          source include/stop_slave_io.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          RESET SLAVE;
          --let $rpl_only_running_threads= 1
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          DROP ROLE journalist;
          DROP USER testuser@localhost;
           
          --source include/rpl_end.inc
          {code}
          angelique.sklavounos Angelique Sklavounos (Inactive) made changes -
          Description Replicate_Wild_Ignore_Table: mysql.% can't make bypass *SET DEFAULT ROLE '<role>' FOR 'user';*

          On master
          {code:java}
          MariaDB [(none)]> create user testuser@'%';
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> CREATE ROLE journalist;
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> grant journalist to testuser@'%';
          Query OK, 0 rows affected (0.001 sec)

          MariaDB [(none)]> select * from mysql.roles_mapping;
          +-----------+----------+-----------------------+--------------+
          | Host | User | Role | Admin_option |
          +-----------+----------+-----------------------+--------------+
          | localhost | root | role_workflow_portals | Y |
          | localhost | root | journalist | Y |
          | % | testuser | journalist | N |
          +-----------+----------+-----------------------+--------------+
          3 rows in set (0.001 sec)

          MariaDB [(none)]> SET DEFAULT ROLE journalist for testuser@'%';
          Query OK, 0 rows affected (0.001 sec)
          {code}

          on slave:

          {code:java}
          MariaDB [(none)]> show slave status\G
          *************************** 1. row ***************************
                          Slave_IO_State: Waiting for master to send event
                             Master_Host: 192.168.254.14
                             Master_User: repl
                             Master_Port: 3306
                           Connect_Retry: 60
                         Master_Log_File: m2-bin.000005
                     Read_Master_Log_Pos: 1077
                          Relay_Log_File: mariadb-relay-bin.000002
                           Relay_Log_Pos: 1220
                   Relay_Master_Log_File: m2-bin.000005
                        Slave_IO_Running: Yes
                       Slave_SQL_Running: No
                         Replicate_Do_DB:
                     Replicate_Ignore_DB:
                      Replicate_Do_Table:
                  Replicate_Ignore_Table:
                 Replicate_Wild_Do_Table:
             Replicate_Wild_Ignore_Table: mysql.%
                              Last_Errno: 1959
                              Last_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
                            Skip_Counter: 0
                     Exec_Master_Log_Pos: 924
                         Relay_Log_Space: 1684
                         Until_Condition: None
                          Until_Log_File:
                           Until_Log_Pos: 0
                      Master_SSL_Allowed: No
                      Master_SSL_CA_File:
                      Master_SSL_CA_Path:
                         Master_SSL_Cert:
                       Master_SSL_Cipher:
                          Master_SSL_Key:
                   Seconds_Behind_Master: NULL
           Master_SSL_Verify_Server_Cert: No
                           Last_IO_Errno: 0
                           Last_IO_Error:
                          Last_SQL_Errno: 1959
                          Last_SQL_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
             Replicate_Ignore_Server_Ids:
                        Master_Server_Id: 3
                          Master_SSL_Crl:
                      Master_SSL_Crlpath:
                              Using_Gtid: Slave_Pos
                             Gtid_IO_Pos: 3-3-5,0-3-2
                 Replicate_Do_Domain_Ids:
             Replicate_Ignore_Domain_Ids:
                           Parallel_Mode: optimistic
                               SQL_Delay: 0
                     SQL_Remaining_Delay: NULL
                 Slave_SQL_Running_State:
                        Slave_DDL_Groups: 5
          Slave_Non_Transactional_Groups: 0
              Slave_Transactional_Groups: 0
          {code}


          *MTR test case for reproducing*
          {code:sql}
          source include/master-slave.inc;
           
          call mtr.add_suppression("Slave: Invalid role specification `journalist` Error_code: 1959");
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
           
          connection slave;
          source include/stop_slave.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
          source include/start_slave.inc;
           
          connection master;
          CREATE ROLE journalist;
          CREATE USER testuser@localhost IDENTIFIED by '';
           
          GRANT journalist to testuser@localhost;
           
          SELECT * from mysql.roles_mapping;
           
          SET DEFAULT ROLE journalist for testuser@localhost;
           
          connection slave;
          --let $slave_sql_errno= 1959
          --let $slave_timeout=5
          source include/wait_for_slave_sql_error.inc;
           
          let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
          --echo Last_SQL_Error = $error
          let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
          --echo Last_SQL_Errno = $errno
          let $repl_wild_filter= query_get_value(SHOW SLAVE STATUS, Replicate_Wild_Ignore_Table, 1);
          --echo Replicate_Wild_Ignore_Table = $repl_wild_filter
           
          # Clean up
          source include/stop_slave_io.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          RESET SLAVE;
          --let $rpl_only_running_threads= 1
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          DROP ROLE journalist;
          DROP USER testuser@localhost;
           
          --source include/rpl_end.inc
          {code}
          Replicate_Wild_Ignore_Table: mysql.% can't make bypass *SET DEFAULT ROLE '<role>' FOR 'user';*

          On master
          {code:java}
          MariaDB [(none)]> create user testuser@'%';
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> CREATE ROLE journalist;
          Query OK, 0 rows affected (0.002 sec)

          MariaDB [(none)]> grant journalist to testuser@'%';
          Query OK, 0 rows affected (0.001 sec)

          MariaDB [(none)]> select * from mysql.roles_mapping;
          +-----------+----------+-----------------------+--------------+
          | Host | User | Role | Admin_option |
          +-----------+----------+-----------------------+--------------+
          | localhost | root | role_workflow_portals | Y |
          | localhost | root | journalist | Y |
          | % | testuser | journalist | N |
          +-----------+----------+-----------------------+--------------+
          3 rows in set (0.001 sec)

          MariaDB [(none)]> SET DEFAULT ROLE journalist for testuser@'%';
          Query OK, 0 rows affected (0.001 sec)
          {code}

          on slave:

          {code:java}
          MariaDB [(none)]> show slave status\G
          *************************** 1. row ***************************
                          Slave_IO_State: Waiting for master to send event
                             Master_Host: 192.168.254.14
                             Master_User: repl
                             Master_Port: 3306
                           Connect_Retry: 60
                         Master_Log_File: m2-bin.000005
                     Read_Master_Log_Pos: 1077
                          Relay_Log_File: mariadb-relay-bin.000002
                           Relay_Log_Pos: 1220
                   Relay_Master_Log_File: m2-bin.000005
                        Slave_IO_Running: Yes
                       Slave_SQL_Running: No
                         Replicate_Do_DB:
                     Replicate_Ignore_DB:
                      Replicate_Do_Table:
                  Replicate_Ignore_Table:
                 Replicate_Wild_Do_Table:
             Replicate_Wild_Ignore_Table: mysql.%
                              Last_Errno: 1959
                              Last_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
                            Skip_Counter: 0
                     Exec_Master_Log_Pos: 924
                         Relay_Log_Space: 1684
                         Until_Condition: None
                          Until_Log_File:
                           Until_Log_Pos: 0
                      Master_SSL_Allowed: No
                      Master_SSL_CA_File:
                      Master_SSL_CA_Path:
                         Master_SSL_Cert:
                       Master_SSL_Cipher:
                          Master_SSL_Key:
                   Seconds_Behind_Master: NULL
           Master_SSL_Verify_Server_Cert: No
                           Last_IO_Errno: 0
                           Last_IO_Error:
                          Last_SQL_Errno: 1959
                          Last_SQL_Error: Error 'Invalid role specification `journalist`' on query. Default database: ''. Query: 'SET DEFAULT ROLE 'journalist' FOR 'testuser'@'%''
             Replicate_Ignore_Server_Ids:
                        Master_Server_Id: 3
                          Master_SSL_Crl:
                      Master_SSL_Crlpath:
                              Using_Gtid: Slave_Pos
                             Gtid_IO_Pos: 3-3-5,0-3-2
                 Replicate_Do_Domain_Ids:
             Replicate_Ignore_Domain_Ids:
                           Parallel_Mode: optimistic
                               SQL_Delay: 0
                     SQL_Remaining_Delay: NULL
                 Slave_SQL_Running_State:
                        Slave_DDL_Groups: 5
          Slave_Non_Transactional_Groups: 0
              Slave_Transactional_Groups: 0
          {code}


          *MTR test case for reproducing*
          {code:sql}
          source include/master-slave.inc;
           
          call mtr.add_suppression("Slave: Invalid role specification `journalist` Error_code: 1959");
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
           
          connection slave;
          source include/stop_slave.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="mysql.%";
          source include/start_slave.inc;
           
          connection master;
          CREATE ROLE journalist;
          CREATE USER testuser@localhost IDENTIFIED by '';
           
          GRANT journalist to testuser@localhost;
           
          SELECT * from mysql.roles_mapping;
           
          SET DEFAULT ROLE journalist for testuser@localhost;
           
          connection slave;
          --let $slave_sql_errno= 1959
          --let $slave_timeout=5
          source include/wait_for_slave_sql_error.inc;
           
          let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
          --echo Last_SQL_Error = $error
          let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
          --echo Last_SQL_Errno = $errno
          let $repl_wild_filter= query_get_value(SHOW SLAVE STATUS, Replicate_Wild_Ignore_Table, 1);
          --echo Replicate_Wild_Ignore_Table = $repl_wild_filter
           
          # Clean up
          source include/stop_slave_io.inc;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          RESET SLAVE;
          --let $rpl_only_running_threads= 1
           
          connection master;
          SET @@GLOBAL.replicate_wild_ignore_table="";
          DROP ROLE journalist;
          DROP USER testuser@localhost;
           
          --source include/rpl_end.inc
          {code}

          Reproduced with:
          10.2 9b2d36660bbb4f93c6b9e0761c91d57d47f59196
          10.3 b208030ef5b4274fd66cc9667a2dc96f6e63db81
          10.4 d16c3aca3c3ecd1050b2527c213f4fdf1959d9e2
          10.5 1a66e3f861a722689a39f83919d1f1a5466f64bf
          10.6 cad792c6862546a13b83f05209e7842a95bdc5fa
          10.7 9e314fcf6e666ce6fdbdd8ca1ae23d6c4b389b21
          10.8 6948abb94c6739101320d12ddec1d2daae929cc2
          10.9 72a125058527126ae31c02851db0d1ca186706f7
          Elkin Andrei Elkin made changes -
          Assignee Angelique Sklavounos [ JIRAUSER50741 ] Brandon Nesterenko [ JIRAUSER48702 ]
          bnestere Brandon Nesterenko made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          bnestere Brandon Nesterenko made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Andrei Elkin [ elkin ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          Elkin Andrei Elkin made changes -
          Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          bnestere Brandon Nesterenko made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Andrei Elkin [ elkin ]
          Status Stalled [ 10000 ] In Review [ 10002 ]
          julien.fritsch Julien Fritsch made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          Elkin Andrei Elkin made changes -
          Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          Elkin Andrei Elkin made changes -
          Comment [ Reviewed on GH. ]
          Elkin Andrei Elkin made changes -
          Assignee Brandon Nesterenko [ JIRAUSER48702 ] Andrei Elkin [ elkin ]
          Elkin Andrei Elkin made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          Elkin Andrei Elkin made changes -
          Status In Progress [ 3 ] In Review [ 10002 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Fix Version/s 10.2 [ 14601 ]
          Elkin Andrei Elkin made changes -
          Assignee Andrei Elkin [ elkin ] Brandon Nesterenko [ JIRAUSER48702 ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          Elkin Andrei Elkin made changes -
          Fix Version/s 10.9.2 [ 27115 ]
          Fix Version/s 10.3.37 [ 28404 ]
          Fix Version/s 10.4.27 [ 28405 ]
          Fix Version/s 10.6.10 [ 28407 ]
          Fix Version/s 10.7.6 [ 28408 ]
          Fix Version/s 10.8.5 [ 28308 ]
          Fix Version/s 10.5.18 [ 28421 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.7 [ 24805 ]
          Fix Version/s 10.8 [ 26121 ]
          Fix Version/s 10.9 [ 26905 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          mariadb-jira-automation Jira Automation (IT) made changes -
          Zendesk Related Tickets 175705

          People

            bnestere Brandon Nesterenko
            allen.lee@mariadb.com Allen Lee (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.