Debian Codegraph @

mysql-test/suite/rpl/t/rpl_group_replication_commands.test

raw
1 # This test checks the basic functionality of the Group Replication
2 # commands introduced to control the plugin
3
4 --source include/have_log_bin.inc
5 --source include/not_group_replication_plugin.inc
6
7 call mtr.add_suppression("Group Replication plugin is not installed.");
8 # Start Group Replication without the plugin loaded
9 # It shall give a configuration error.
10 --error ER_GROUP_REPLICATION_CONFIGURATION
11 START GROUP_REPLICATION;
12
13 # Stop Group Replication without the plugin loaded
14 # It shall give a configuration error.
15 --error ER_GROUP_REPLICATION_CONFIGURATION
16 STOP GROUP_REPLICATION;
17
18
19 #########################################################################################
20 # This test verify that only user with super privileges can execute following
21 # commands"
22 # - START GROUP_REPLICATION
23 # - STOP GROUP_REPLICATION
24 #
25 #########################################################################################
26
27 CREATE USER 'group_rpl_user' IDENTIFIED BY '';
28 --connect (con_group_rpl_user,127.0.0.1,group_rpl_user,,test,$MASTER_MYPORT,,)
29 --connection con_group_rpl_user
30
31 # Start Group Replication with non-super privilege user
32 # It shall give a acess denied error.
33 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
34 START GROUP_REPLICATION;
35
36 # Stop Group Replication with non-super privilege user
37 # It shall give a acess denied error.
38 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
39 STOP GROUP_REPLICATION;
40
41 --connection default
42 # Start / Stop replication should be possible with the
43 # GROUP_REPLICATION_ADMIN command
44 GRANT GROUP_REPLICATION_ADMIN ON *.* TO group_rpl_user;
45 --connection con_group_rpl_user
46 --error ER_GROUP_REPLICATION_CONFIGURATION
47 START GROUP_REPLICATION;
48 --error ER_GROUP_REPLICATION_CONFIGURATION
49 STOP GROUP_REPLICATION;
50
51 --connection default
52 --disconnect con_group_rpl_user
53 DROP USER group_rpl_user;