Debian Codegraph @

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

raw
1 include/group_replication.inc
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 # 1. Bootstrap M1. And create new users.
8 [connection server1]
9 INSTALL PLUGIN test_plugin_server SONAME 'PLUGIN_AUTH';
10 include/start_and_bootstrap_group_replication.inc
11 SET SQL_LOG_BIN=0;
12 CREATE USER 'regular_user_p' IDENTIFIED BY '012345678901234567890123456789ab';
13 CREATE USER 'regular_user_wp' IDENTIFIED BY '';
14 CREATE USER 'plug_user_p' IDENTIFIED WITH 'test_plugin_server' AS 'proxy_user_p';
15 CREATE USER 'plug_user_wp' IDENTIFIED WITH 'test_plugin_server' AS 'proxy_user_wp';
16 CREATE USER 'proxy_user_p' IDENTIFIED BY 'password';
17 CREATE USER 'proxy_user_wp' IDENTIFIED BY '';
18 GRANT REPLICATION SLAVE ON *.* TO "regular_user_p";
19 GRANT REPLICATION SLAVE ON *.* TO "regular_user_wp";
20 GRANT ALL PRIVILEGES ON *.* TO 'proxy_user_p';
21 GRANT ALL PRIVILEGES ON *.* TO 'proxy_user_wp';
22 GRANT PROXY ON 'proxy_user_p' to 'plug_user_p';
23 GRANT PROXY ON 'proxy_user_wp' to 'plug_user_wp';
24 GRANT REPLICATION SLAVE ON *.* TO 'plug_user_p';
25 GRANT REPLICATION SLAVE ON *.* TO 'plug_user_wp';
26 SET SQL_LOG_BIN=1;
27
28 # 2. Reset recovery interval to 1 and count to 2 for M2.
29 [connection server2]
30 INSTALL PLUGIN test_plugin_server SONAME 'PLUGIN_AUTH';
31 SET @saved_group_replication_recovery_reconnect_interval = @@GLOBAL.group_replication_recovery_reconnect_interval;
32 SET @saved_gr_recovery_retry_count = @@GLOBAL.group_replication_recovery_retry_count;
33 SET @old_log_output= @@log_output;
34 SET GLOBAL log_output= 'TABLE,FILE';
35 SET GLOBAL group_replication_recovery_reconnect_interval= 1;
36 SET GLOBAL group_replication_recovery_retry_count= 2;
37 SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
38 RESET SLAVE ALL FOR CHANNEL 'group_replication_recovery';
39 Warnings:
40 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
41
42 # 3. Test empty USER is not accepted by START GR.
43 # Test username displayed is correct in ps table.
44 SET GLOBAL super_read_only= FALSE;
45 SET SQL_LOG_BIN=0;
46 TRUNCATE mysql.general_log;
47 SET SQL_LOG_BIN=1;
48 START GROUP_REPLICATION USER='';
49 ERROR HY000: The START GROUP_REPLICATION command failed since the username provided for recovery channel is empty.
50 include/assert.inc [Command is not logged.]
51 SET GLOBAL super_read_only= FALSE;
52 SET SQL_LOG_BIN=0;
53 TRUNCATE mysql.general_log;
54 SET SQL_LOG_BIN=1;
55 START GROUP_REPLICATION USER;
56 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
57 include/assert.inc [Command is not logged.]
58
59 # 3. Test password limits.
60 SET GLOBAL super_read_only= FALSE;
61 SET SQL_LOG_BIN=0;
62 TRUNCATE mysql.general_log;
63 SET SQL_LOG_BIN=1;
64 START GROUP_REPLICATION USER='regular_user_p' , PASSWORD='012345678901234567890123456789abc';
65 ERROR HY000: The START GROUP_REPLICATION command failed since the password provided for the recovery channel exceeds the maximum length of 32 characters.
66 include/assert.inc [Command is not logged.]
67 SET GLOBAL super_read_only= FALSE;
68 SET SQL_LOG_BIN=0;
69 TRUNCATE mysql.general_log;
70 SET SQL_LOG_BIN=1;
71 [connection server1]
72 SET @@GLOBAL.DEBUG='+d,block_applier_updates';
73 [connection server2]
74 START GROUP_REPLICATION USER='regular_user_p' , PASSWORD='012345678901234567890123456789ab';
75 include/assert.inc [User name displayed is of supplied in command.]
76 [connection server1]
77 SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked";
78 SET @@GLOBAL.DEBUG='-d,block_applier_updates';
79 SET DEBUG_SYNC = "now SIGNAL resume_applier_read";
80 [connection server2]
81 include/gr_wait_for_member_state.inc
82 [connection server1]
83 SET DEBUG_SYNC= 'RESET';
84 [connection server2]
85 include/assert.inc [User name displayed is empty.]
86 include/stop_group_replication.inc
87 include/assert.inc [Password is not logged.]
88 include/assert.inc [Password is logged as secret.]
89
90 # 4. Test credentials without USER are not accepted.
91 SET GLOBAL super_read_only= FALSE;
92 SET SQL_LOG_BIN=0;
93 TRUNCATE mysql.general_log;
94 SET SQL_LOG_BIN=1;
95 START GROUP_REPLICATION PASSWORD='wrong';
96 ERROR HY000: The START GROUP_REPLICATION command failed since the USER option was not provided with PASSWORD for recovery channel.
97 include/assert.inc [Password is not logged.]
98 include/assert.inc [Password is logged as secret.]
99 SET GLOBAL super_read_only= FALSE;
100 SET SQL_LOG_BIN=0;
101 TRUNCATE mysql.general_log;
102 SET SQL_LOG_BIN=1;
103 START GROUP_REPLICATION USER='',PASSWORD='wrong';
104 ERROR HY000: The START GROUP_REPLICATION command failed since the username provided for recovery channel is empty.
105 include/assert.inc [Command is not logged.]
106
107 # 5. Test DEFAULT_AUTH without USER.
108 # Credentials are not set in CHANGE MASTER so START GR fails.
109 SET GLOBAL super_read_only= FALSE;
110 SET SQL_LOG_BIN=0;
111 TRUNCATE mysql.general_log;
112 SET SQL_LOG_BIN=1;
113 START GROUP_REPLICATION DEFAULT_AUTH='auth_test_plugin';
114 include/gr_wait_for_member_state.inc
115 include/stop_group_replication.inc
116 include/assert.inc [User is not logged.]
117 include/assert.inc [Password is not logged.]
118 include/assert.inc [Quote is not present before DEFAULT_AUTH.]
119
120 # 6. Set credentials in CHANGE MASTER.
121 # Pass only DEFAULT_AUTH in START GR.
122 # Credentials are picked from CHANGE MASTER.
123 CHANGE REPLICATION SOURCE TO SOURCE_USER='plug_user_p' , SOURCE_PASSWORD='proxy_user_p' FOR CHANNEL 'group_replication_recovery';
124 Warnings:
125 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
126 Note 1760 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.
127 SET GLOBAL super_read_only= FALSE;
128 SET SQL_LOG_BIN=0;
129 TRUNCATE mysql.general_log;
130 SET SQL_LOG_BIN=1;
131 START GROUP_REPLICATION DEFAULT_AUTH='auth_test_plugin';
132 include/gr_wait_for_member_state.inc
133 include/stop_group_replication.inc
134 include/assert.inc [User is not logged.]
135 include/assert.inc [Password is not logged.]
136 include/assert.inc [Quote is not present before DEFAULT_AUTH.]
137 START GROUP_REPLICATION DEFAULT_AUTH='wrong';
138 include/gr_wait_for_member_state.inc
139 include/stop_group_replication.inc
140
141 # 7. Cleanup.
142 CHANGE REPLICATION SOURCE TO SOURCE_USER='root' , SOURCE_PASSWORD='' FOR CHANNEL 'group_replication_recovery';
143 Warnings:
144 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
145 Note 1760 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.
146 SET SESSION sql_log_bin = 0;
147 call mtr.add_suppression("Replica I/O for channel 'group_replication_recovery': Fatal error: Invalid .* username when attempting to connect to the source server.*");
148 call mtr.add_suppression("There was an error when connecting to the donor server. Please check that group_replication_recovery channel credentials and all MEMBER_HOST column values of performance_schema.replication_group_members table are correct and DNS resolvable.");
149 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.");
150 call mtr.add_suppression("Maximum number of retries when trying to connect to a donor reached. Aborting group replication incremental recovery.");
151 call mtr.add_suppression("Fatal error during the incremental recovery process of Group Replication. The server will leave the group.");
152 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
153 call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
154 call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
155 SET SESSION sql_log_bin = 1;
156 SET @@GLOBAL.group_replication_recovery_reconnect_interval = @saved_group_replication_recovery_reconnect_interval;
157 SET @@GLOBAL.group_replication_recovery_retry_count = @saved_gr_recovery_retry_count;
158 SET GLOBAL log_output= @old_log_output;
159 UNINSTALL PLUGIN test_plugin_server;
160 [connection server1]
161 SET SQL_LOG_BIN=0;
162 DROP USER 'regular_user_p';
163 DROP USER 'regular_user_wp';
164 DROP USER 'plug_user_p';
165 DROP USER 'plug_user_wp';
166 DROP USER 'proxy_user_p';
167 DROP USER 'proxy_user_wp';
168 SET SQL_LOG_BIN=1;
169 UNINSTALL PLUGIN test_plugin_server;
170 include/group_replication_end.inc
171 [connection server2]
172 TRUNCATE mysql.general_log;