[MDEV-10566] Create role statement replicated inconsistently in Galera Cluster Created: 2016-08-16  Updated: 2016-09-27  Resolved: 2016-08-24

Status: Closed
Project: MariaDB Server
Component/s: Admin statements, Galera
Affects Version/s: 10.0.26-galera
Fix Version/s: 10.1.18, 10.0.27-galera

Type: Bug Priority: Major
Reporter: Przemek Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

CREATE ROLE ... WITH ADMIN ... is replicated correctly in the cluster, but CREATE ROLE ... alone leaves the secondary nodes with different results in mysql.roles_mapping, information_schema.APPLICABLE_ROLES, show grants, etc.

Example:

node1 {root} ((none)) > select @@version,@@version_comment;
+--------------------------------+-------------------------------------------------------+
| @@version                      | @@version_comment                                     |
+--------------------------------+-------------------------------------------------------+
| 10.0.26-MariaDB-1~wheezy-wsrep | mariadb.org binary distribution, wsrep_25.13.raf7f02e |
+--------------------------------+-------------------------------------------------------+
1 row in set (0.00 sec)
 
node1 {root} ((none)) > CREATE ROLE foo;
Query OK, 0 rows affected (0.01 sec)
 
node1 {root} ((none)) > SELECT * FROM mysql.roles_mapping;
+-----------+------+------+--------------+
| Host      | User | Role | Admin_option |
+-----------+------+------+--------------+
| localhost | root | foo  | Y            |
+-----------+------+------+--------------+
1 row in set (0.00 sec)
 
node1 {root} ((none)) > select * from information_schema.APPLICABLE_ROLES;
+----------------+-----------+--------------+
| GRANTEE        | ROLE_NAME | IS_GRANTABLE |
+----------------+-----------+--------------+
| root@localhost | foo       | YES          |
+----------------+-----------+--------------+
1 row in set (0.00 sec)
 
-- second node in the same Galera cluster:
node2 {root} ((none)) > select @@version,@@version_comment;
+--------------------------------+-------------------------------------------------------+
| @@version                      | @@version_comment                                     |
+--------------------------------+-------------------------------------------------------+
| 10.0.26-MariaDB-1~wheezy-wsrep | mariadb.org binary distribution, wsrep_25.13.raf7f02e |
+--------------------------------+-------------------------------------------------------+
1 row in set (0.00 sec)
 
node2 {root} ((none)) > SELECT * FROM mysql.roles_mapping;
+------+------+------+--------------+
| Host | User | Role | Admin_option |
+------+------+------+--------------+
|      |      | foo  | Y            |
+------+------+------+--------------+
1 row in set (0.00 sec)
 
node2 {root} ((none)) > select * from information_schema.APPLICABLE_ROLES;
Empty set (0.00 sec)


Generated at Thu Feb 08 07:43:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.