Debian Codegraph @

mysql-test/suite/group_replication/r/gr_recovery.result

raw
1 include/group_replication.inc [rpl_server_count=3]
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 #
7 # Setup a new group
8 #
9 server1
10 include/start_and_bootstrap_group_replication.inc
11 # Add some data for recovery
12 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
13 BEGIN;
14 INSERT INTO t1 VALUES (1);
15 INSERT INTO t1 VALUES (2);
16 COMMIT;
17 INSERT INTO t1 VALUES (3);
18 #
19 # 1) Testing the recovery of a new member
20 #
21 #Add 2 more members
22 server2
23 include/start_group_replication.inc
24 server3
25 include/start_group_replication.inc
26 #After recovery all members must see 3 other members
27 include/rpl_gr_wait_for_number_of_members.inc
28 include/rpl_gr_wait_for_number_of_members.inc
29 include/rpl_gr_wait_for_number_of_members.inc
30 #After recovery all members must have the data present in the donor.
31 include/assert.inc [On all members, the table should exist and have 3 elements]
32 include/assert.inc [On all members, the table should exist and have 3 elements]
33 include/assert.inc [On all members, the table should exist and have 3 elements]
34 #Test if the group responds to requests
35 server1
36 INSERT INTO t1 VALUES (4);
37 server2
38 INSERT INTO t1 VALUES (5);
39 server3
40 include/rpl_sync.inc
41 #All members must have the same GTID set
42 include/assert.inc [On member 3, all executed GTID should belong to the group]
43 include/assert.inc [On member 2, all executed GTID should belong to the group]
44 include/assert.inc [On member 1, all executed GTID should belong to the group]
45 #Check if the data is the same on joiner and donor
46 include/diff_tables.inc [server1:test.t1, server2:test.t1]
47 #
48 # 2) Testing recovery on a member that left and now returns
49 #
50 #Stop the member 1, who never went through recovery
51 server1
52 include/stop_group_replication.inc
53 #Add some data to the future donor
54 server2
55 INSERT INTO t1 VALUES (6);
56 server1
57 include/start_group_replication.inc
58 include/assert.inc [On the recovered member, the table should contain 6 elements]
59 #Test if the group responds to requests
60 server2
61 INSERT INTO t1 VALUES (7);
62 include/sync_slave_sql_with_master.inc
63 include/sync_slave_sql_with_master.inc
64 include/diff_tables.inc [server1:test.t1, server2:test.t1]
65 #
66 # 3) Testing a second recovery round on a member
67 #
68 #Stop the member 2 making it go through recovery again
69 include/stop_group_replication.inc
70 #Add some data to the future donor
71 server1
72 INSERT INTO t1 VALUES (8);
73 server2
74 include/start_group_replication.inc
75 include/assert.inc [On the recovered member, the table should contain 8 elements]
76 #Test if the group responds to requests
77 INSERT INTO t1 VALUES (9);
78 server1
79 include/diff_tables.inc [server1:test.t1, server2:test.t1]
80 #
81 # Cleaning up
82 #
83 DROP TABLE t1;
84 include/group_replication_end.inc