Debian Codegraph @

mysql-test/suite/group_replication/r/gr_recovery_reconnection_options.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 # Start a group with 2 members and some data but no replication user
8 #
9 include/start_and_bootstrap_group_replication.inc
10 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
11 INSERT INTO t1 VALUES (1);
12 #
13 # Add some extra data on server 2 and then start group replication
14 # Create a replication user so recovery can connect
15 #
16 include/start_group_replication.inc
17 #
18 # On member 3:
19 # Set the number of recovery retries and check its value
20 # Set the recovery reconnection interval and check its value
21 #
22 SET SESSION sql_log_bin= 0;
23 call mtr.add_suppression("There was an error when connecting to the donor*");
24 call mtr.add_suppression("Replica I/O for channel 'group_replication_recovery': Source command COM_REGISTER_REPLICA failed*");
25 call mtr.add_suppression("Replica I/O thread couldn't register on source*");
26 call mtr.add_suppression("For details please check performance_schema.replication_connection_status table and error log messages of Replica I/O for channel group_replication_recovery.");
27 SET SESSION sql_log_bin= 1;
28 SET @debug_save_rec_int= @@GLOBAL.group_replication_recovery_reconnect_interval;
29 SET @debug_save_retries= @@GLOBAL.group_replication_recovery_retry_count;
30 SET GLOBAL group_replication_recovery_reconnect_interval= NULL;
31 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_reconnect_interval'
32 SET GLOBAL group_replication_recovery_reconnect_interval= "a";
33 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_reconnect_interval'
34 SET GLOBAL group_replication_recovery_reconnect_interval= 1.2;
35 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_reconnect_interval'
36 SET GLOBAL group_replication_recovery_retry_count= NULL;
37 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_retry_count'
38 SET GLOBAL group_replication_recovery_retry_count= "a";
39 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_retry_count'
40 SET GLOBAL group_replication_recovery_retry_count= 1.2;
41 ERROR 42000: Incorrect argument type to variable 'group_replication_recovery_retry_count'
42 SET GLOBAL group_replication_recovery_reconnect_interval= -1;
43 include/assert.inc [The value for group_replication_recovery_reconnect_interval should be 0]
44 SET GLOBAL group_replication_recovery_reconnect_interval= 31536001;
45 include/assert.inc [The value for group_replication_recovery_reconnect_interval should be 31536000]
46 SET GLOBAL group_replication_recovery_retry_count= -1;
47 include/assert.inc [The value for group_replication_recovery_retry_count should be 0]
48 SET GLOBAL group_replication_recovery_retry_count= 31536001;
49 include/assert.inc [The value for group_replication_recovery_retry_count should be 31536000]
50 SET GLOBAL group_replication_recovery_retry_count= 3;
51 include/assert.inc [The value of the recovery retry count should be 3]
52 SET GLOBAL group_replication_recovery_reconnect_interval= 60;
53 include/assert.inc [The value of the recovery reconnection interval should be 60 sec]
54 #
55 # On member 3:
56 # Set the recovery user and pass so it can't connect to any of the donors
57 # After 10 second it should still be recovering, as the process is sleeping
58 #
59 SET SESSION sql_log_bin= 0;
60 CREATE USER "recovery_user" IDENTIFIED BY "recovery_password";
61 GRANT GROUP_REPLICATION_STREAM ON *.* TO "recovery_user"@'%';;
62 FLUSH PRIVILEGES;
63 SET SESSION sql_log_bin= 1;
64 SET SESSION sql_log_bin= 0;
65 CREATE USER "recovery_user" IDENTIFIED BY "recovery_password";
66 GRANT GROUP_REPLICATION_STREAM ON *.* TO "recovery_user"@'%';;
67 FLUSH PRIVILEGES;
68 SET SESSION sql_log_bin= 1;
69 SET SESSION sql_log_bin= 0;
70 CREATE USER "recovery_user" IDENTIFIED BY "recovery_password";
71 GRANT GROUP_REPLICATION_STREAM ON *.* TO "recovery_user"@'%';;
72 FLUSH PRIVILEGES;
73 SET SESSION sql_log_bin= 1;
74 CHANGE REPLICATION SOURCE TO SOURCE_USER="recovery_user", SOURCE_PASSWORD="recovery_password" FOR CHANNEL 'group_replication_recovery';
75 SET GLOBAL group_replication_group_name= "c827dcd0-2646-11e5-867f-0800200c9a66";;
76 START GROUP_REPLICATION;
77 include/gr_wait_for_member_state.inc
78 #
79 # Create the recovery user on server 1 and server 2
80 # The joiner should now connect to server 1 or 2 when failing over.
81 #
82 SET SESSION sql_log_bin= 0;
83 GRANT REPLICATION SLAVE ON *.* TO "recovery_user";
84 FLUSH PRIVILEGES;
85 SET SESSION sql_log_bin= 1;
86 SET SESSION sql_log_bin= 0;
87 GRANT REPLICATION SLAVE ON *.* TO "recovery_user";
88 FLUSH PRIVILEGES;
89 SET SESSION sql_log_bin= 1;
90 # After a minute, the node should failover on the last try and recover
91 include/gr_wait_for_member_state.inc
92 include/assert.inc [On the recovered member, the table should exist and have 1 elements]
93 #
94 # Cleaning up
95 #
96 SET @@GLOBAL.group_replication_recovery_reconnect_interval= @debug_save_rec_int;
97 SET @@GLOBAL.group_replication_recovery_retry_count= @debug_save_retries;
98 SET SESSION sql_log_bin= 0;
99 DROP USER "recovery_user";
100 SET SESSION sql_log_bin= 1;
101 DROP TABLE t1;
102 SET SESSION sql_log_bin= 0;
103 DROP USER "recovery_user";
104 SET SESSION sql_log_bin= 1;
105 SET SESSION sql_log_bin= 0;
106 DROP USER "recovery_user";
107 SET SESSION sql_log_bin= 1;
108 include/group_replication_end.inc