summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/galera/r')
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result41
1 files changed, 40 insertions, 1 deletions
diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result
index c0cdbc0e338..d8c13758797 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -69,8 +69,8 @@ SET ROLE role1;
FLUSH TABLES;
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
- role1 Y
localhost foo role1 N
+localhost root role1 Y
SHOW TABLES FROM test1;
Tables_in_test1
t1
@@ -153,4 +153,43 @@ role1
# Connect with node_1
DROP USER foo@localhost;
DROP DATABASE test1;
+#
+# MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
+#
+
+# On node_1
+CREATE USER foo@localhost;
+CREATE ROLE role1;
+CREATE ROLE role2 WITH ADMIN CURRENT_USER;
+CREATE ROLE role3 WITH ADMIN foo@localhost;
+CREATE ROLE role4 WITH ADMIN role1;
+SELECT * FROM mysql.roles_mapping;
+Host User Role Admin_option
+ role1 role4 Y
+localhost foo role3 Y
+localhost root role1 Y
+localhost root role2 Y
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+GRANTEE ROLE_NAME IS_GRANTABLE
+role1 role4 YES
+root@localhost role1 YES
+root@localhost role2 YES
+
+# On node_2
+SELECT * FROM mysql.roles_mapping;
+Host User Role Admin_option
+ role1 role4 Y
+localhost foo role3 Y
+localhost root role1 Y
+localhost root role2 Y
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+GRANTEE ROLE_NAME IS_GRANTABLE
+role1 role4 YES
+root@localhost role1 YES
+root@localhost role2 YES
+DROP ROLE role1;
+DROP ROLE role2;
+DROP ROLE role3;
+DROP ROLE role4;
+DROP USER foo@localhost;
# End of test