Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=2]
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 ############################################################
8 # 01. Boot start server1
9 [connection server1]
10 include/save_sysvars.inc [ "GLOBAL.group_replication_consistency" ]
11 SET GLOBAL group_replication_consistency= 'AFTER';
12 include/start_and_bootstrap_group_replication.inc
13
14 ############################################################
15 # 2. Start server2
16 [connection server2]
17 include/save_sysvars.inc [ "GLOBAL.group_replication_consistency" ]
18 SET GLOBAL group_replication_consistency= 'AFTER';
19 include/start_group_replication.inc
20
21 ############################################################
22 # 3. Stop GR on server1
23 [connection server1]
24 include/stop_group_replication.inc
25
26 ############################################################
27 # 4. Execute transactions on the new primary
28 [connection server2]
29 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
30 INSERT INTO t1 VALUES (1);
31 INSERT INTO t1 VALUES (2);
32 INSERT INTO t1 VALUES (3);
33
34 ############################################################
35 # 5. Add debug points in server1
36 [connection server1]
37 SET @@GLOBAL.DEBUG= '+d,recovery_thread_wait_after_wait_for_applier_module_recovery';
38
39 ############################################################
40 # 6. Start GR on server1, let it waits after
41 # after_wait_for_applier_module_recovery
42 include/start_group_replication.inc
43 SET DEBUG_SYNC = "now WAIT_FOR signal.recovery_thread_wait_after_wait_for_applier_module_recovery";
44 include/assert.inc [Verify MEMBER_STATE is RECOVERING]
45
46 ############################################################
47 # 7. Add debug points in server1, server waits
48 # before_commit_hook_wait
49 SET @@GLOBAL.DEBUG= '+d,group_replication_before_commit_hook_wait';
50
51 ############################################################
52 # 8. Commit a transaction on server2 while server1 is
53 # in recovery
54 [connection server2]
55 INSERT INTO t1 VALUES (4);
56 ############################################################
57 # 9. On server1, wait for the transaction to reach debug
58 # sync point
59 [connection server1]
60 SET DEBUG_SYNC= "now WAIT_FOR signal.group_replication_before_commit_hook_wait_reached";
61 ############################################################
62 # 10. Resume recovery on server1, verify that server1 is
63 # online
64 SET @@GLOBAL.DEBUG= '-d,recovery_thread_wait_after_wait_for_applier_module_recovery';
65 SET DEBUG_SYNC= "now SIGNAL signal.recovery_thread_resume_after_wait_for_applier_module_recovery";
66 include/gr_wait_for_member_state.inc
67 ############################################################
68 # 11. Resume transaction recived during recovery, verify all
69 # members are still online and server1 executed the
70 # transaction
71 SET @@GLOBAL.DEBUG= '-d,group_replication_before_commit_hook_wait';
72 SET DEBUG_SYNC= "now SIGNAL continue_commit";
73 ############################################################
74 # 12. Verify that all members are still online and server1
75 # executed the transaction
76 include/assert.inc [There are three members in the group]
77 include/assert.inc [On the recovered member, the table should contain 4 elements]
78 ############################################################
79 # 13. Verify that all members have same data
80 include/diff_tables.inc [server1:test.t1, server2:test.t1]
81 ############################################################
82 # 14. Cleaning up
83 SET DEBUG_SYNC= 'RESET';
84 include/restore_sysvars.inc
85 [connection server2]
86 include/restore_sysvars.inc
87 DROP TABLE t1;
88 include/group_replication_end.inc