1include/have_replication_observers_example_plugin.inc
2include/group_replication.inc
3Warnings:
4Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
5Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
6[connection server1]
7
8# 1. Load plugin replication observers example on server1
9include/install_replication_observers_example.inc
10
11# 2. Load plugin replication observers example on server2 and store
12#    variables to use when start GR
13[connection server2]
14include/install_replication_observers_example.inc
15
16# 3. Stop GR on server2
17include/stop_group_replication.inc
18
19# 4. Server2 will not be able to send message, GR is stopped
20SELECT group_replication_service_message_send("tag", "Server2 sent a message");
21ERROR HY000: group_replication_service_message_send UDF failed; No send service to propagate message to a group.
22
23# 5. Server1 send a message on GR delivery system
24[connection server1]
25SELECT group_replication_service_message_send("tag", "Server1 sent a message");
26group_replication_service_message_send("tag", "Server1 sent a message")
27The tag and message was sent to the group.
28
29# 6. Start Group Replication on server 2
30[connection server2]
31include/start_group_replication.inc
32
33# 7. Uninstall GR from server1
34[connection server1]
35include/uninstall_group_replication_plugin.inc
36
37# 8. Server1 will not be able to send message, GR plugin isn't present
38SELECT group_replication_service_message_send("tag", "Server1 sent another message");
39ERROR HY000: group_replication_service_message_send UDF failed; No send service to propagate message to a group.
40
41# 9. Server2 send another message on GR delivery system. This will be
42#    delivered.
43[connection server2]
44SELECT group_replication_service_message_send("tag", "Server2 sent another message");
45group_replication_service_message_send("tag", "Server2 sent another message")
46The tag and message was sent to the group.
47
48# 10. Start GR on server1, which will make it wait for the delivery of new
49#     view, and that will happen only after delivery of service message.
50#     This will give some time to server to receive and write it to error
51#     log.
52[connection server1]
53include/install_group_replication_plugin.inc
54SET @@global.group_replication_group_seeds="GROUP_SEEDS";
55SET @@global.group_replication_local_address="LOCAL_ADDRESS";
56include/start_group_replication.inc
57
58# 11. Assert server 2 received message from itself
59[connection server2]
60include/assert_grep.inc [Server 2 received message from itself.]
61
62# 12. Assert server 1 received message from itself
63[connection server1]
64include/assert_grep.inc [Server 1 received one message from itself.]
65
66# 13. Cleanup
67include/uninstall_replication_observers_example.inc
68[connection server2]
69include/uninstall_replication_observers_example.inc
70include/group_replication_end.inc
71