| 1 |
############################################################################### |
| 2 |
# Basic test to set the group replication variables and verify if the GR |
| 3 |
# variables are set correctly using xplugin (x prototcol) |
| 4 |
# |
| 5 |
# NOTE : All the queries through mysqlx plugin is passed using mysqlxtest. |
| 6 |
# |
| 7 |
# Test: |
| 8 |
# 0. This test requires one server. |
| 9 |
# 1. Verify that all the group replication variables are GLOBAL variables. |
| 10 |
# 2. Copy the original Values of GR variables. |
| 11 |
# 3. Set/Modify the GR variables. |
| 12 |
# 4. Assert all the modified variables. |
| 13 |
# 5. Clean-up |
| 14 |
############################################################################### |
| 15 |
|
| 16 |
--source include/big_test.inc |
| 17 |
--source include/have_group_replication_xcom_communication_stack.inc |
| 18 |
--source include/have_mysqlx_plugin.inc |
| 19 |
--source include/have_group_replication_plugin_base.inc |
| 20 |
|
| 21 |
## This initial setup starts three servers with all the prerequisites required |
| 22 |
## for GR to start |
| 23 |
|
| 24 |
--source include/have_group_replication_plugin.inc |
| 25 |
--let $rpl_skip_group_replication_start= 1 |
| 26 |
--let $rpl_server_count= 2 |
| 27 |
--source include/group_replication.inc |
| 28 |
|
| 29 |
## Install Mysqlx plugin on all servers and fetch the mysqlx_port to the local |
| 30 |
## variables |
| 31 |
|
| 32 |
--let $rpl_connection_name= server1 |
| 33 |
--source include/rpl_connection.inc |
| 34 |
--source include/xplugin_wait_for_interfaces.inc |
| 35 |
--let $mysqlx_port1= `Select @@Global.mysqlx_port` |
| 36 |
|
| 37 |
# File for starting GR through X-protocol |
| 38 |
# Bootstrap-server |
| 39 |
--write_file $MYSQL_TMP_DIR/bootstrap_server.tmp |
| 40 |
-->sql |
| 41 |
SET GLOBAL GROUP_REPLICATION_GROUP_NAME = 'aaaaaaaa-eeee-aaaa-aaaa-aaaaaaaaaaaa'; |
| 42 |
SET @@GLOBAL.group_replication_ip_allowlist= "AUTOMATIC"; |
| 43 |
SET GLOBAL GROUP_REPLICATION_BOOTSTRAP_GROUP=1; |
| 44 |
START GROUP_REPLICATION; |
| 45 |
SET GLOBAL GROUP_REPLICATION_BOOTSTRAP_GROUP=0; |
| 46 |
-->endsql |
| 47 |
EOF |
| 48 |
|
| 49 |
--echo Starting GR on server 1 |
| 50 |
--exec $MYSQLXTEST --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256' -u root --port=$mysqlx_port1 --file=$MYSQL_TMP_DIR/bootstrap_server.tmp 2>&1 |
| 51 |
|
| 52 |
# Wait for member state to be ONLINE |
| 53 |
--let $group_replication_member_state= ONLINE |
| 54 |
--source include/gr_wait_for_member_state.inc |
| 55 |
|
| 56 |
--let $group_replication_group_seeds=`SELECT @@GLOBAL.group_replication_group_seeds` |
| 57 |
--let $group_replication_local_address=`SELECT @@GLOBAL.group_replication_local_address` |
| 58 |
|
| 59 |
--let $xcom_port = `SELECT SUBSTR("$group_replication_local_address",11,5)` |
| 60 |
|
| 61 |
## Verify the default values of some of the GLOBAL variables whose values are independent of the MTR enviroment |
| 62 |
|
| 63 |
--let $assert_text= group_replication_allow_local_lower_version_join is OFF |
| 64 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_allow_local_lower_version_join]" = "0" |
| 65 |
--source include/assert.inc |
| 66 |
|
| 67 |
--let $assert_text= group_replication_auto_increment_increment is 7 |
| 68 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_auto_increment_increment]" = "7" |
| 69 |
--source include/assert.inc |
| 70 |
|
| 71 |
--let $assert_text= group_replication_components_stop_timeout is 300 |
| 72 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_components_stop_timeout]" = "300" |
| 73 |
--source include/assert.inc |
| 74 |
|
| 75 |
--let $assert_text= group_replication_compression_threshold is 1000000 |
| 76 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_compression_threshold]" = "1000000" |
| 77 |
--source include/assert.inc |
| 78 |
|
| 79 |
--let $assert_text= group_replication_enforce_update_everywhere_checks is ON |
| 80 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_enforce_update_everywhere_checks]" = "1" |
| 81 |
--source include/assert.inc |
| 82 |
|
| 83 |
--let $assert_text= group_replication_flow_control_applier_threshold is 25000 |
| 84 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_applier_threshold]" = "25000" |
| 85 |
--source include/assert.inc |
| 86 |
|
| 87 |
--let $assert_text= group_replication_flow_control_certifier_threshold is 25000 |
| 88 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold]" = "25000" |
| 89 |
--source include/assert.inc |
| 90 |
|
| 91 |
--let $assert_text= group_replication_flow_control_mode is QUOTA |
| 92 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "QUOTA" |
| 93 |
--source include/assert.inc |
| 94 |
|
| 95 |
--let $assert_text= group_replication_ip_allowlist is AUTOMATIC |
| 96 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ip_allowlist]" = "AUTOMATIC" |
| 97 |
--source include/assert.inc |
| 98 |
|
| 99 |
--let $assert_text= group_replication_poll_spin_loops is 0 |
| 100 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_poll_spin_loops]" = "0" |
| 101 |
--source include/assert.inc |
| 102 |
|
| 103 |
--let $assert_text= group_replication_recovery_complete_at is TRANSACTIONS_APPLIED |
| 104 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_complete_at]" = "TRANSACTIONS_APPLIED" |
| 105 |
--source include/assert.inc |
| 106 |
|
| 107 |
--let $assert_text= group_replication_recovery_reconnect_interval is 60 |
| 108 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_reconnect_interval]" = "60" |
| 109 |
--source include/assert.inc |
| 110 |
|
| 111 |
--let $assert_text= group_replication_recovery_retry_count is 10 |
| 112 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_retry_count]" = "10" |
| 113 |
--source include/assert.inc |
| 114 |
|
| 115 |
--let $assert_text= group_replication_start_on_boot is OFF |
| 116 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_start_on_boot]" = "0" |
| 117 |
--source include/assert.inc |
| 118 |
|
| 119 |
--let $assert_text= group_replication_single_primary_mode is OFF |
| 120 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_single_primary_mode]" = "0" |
| 121 |
--source include/assert.inc |
| 122 |
|
| 123 |
## Save the original values of each GLOBAL variable |
| 124 |
|
| 125 |
--source include/stop_group_replication.inc |
| 126 |
|
| 127 |
SET @group_replication_allow_local_lower_version_join_save= @@GLOBAL.group_replication_allow_local_lower_version_join; |
| 128 |
SET @group_replication_auto_increment_increment_save= @@GLOBAL.group_replication_auto_increment_increment; |
| 129 |
SET @group_replication_components_stop_timeout_save= @@GLOBAL.group_replication_components_stop_timeout; |
| 130 |
SET @group_replication_compression_threshold_save= @@GLOBAL.group_replication_compression_threshold; |
| 131 |
SET @group_replication_enforce_update_everywhere_checks_save= @@GLOBAL.group_replication_enforce_update_everywhere_checks; |
| 132 |
SET @group_replication_flow_control_applier_threshold_save= @@GLOBAL.group_replication_flow_control_applier_threshold; |
| 133 |
SET @group_replication_flow_control_certifier_threshold_save= @@GLOBAL.group_replication_flow_control_certifier_threshold; |
| 134 |
SET @group_replication_flow_control_mode_save= @@GLOBAL.group_replication_flow_control_mode; |
| 135 |
SET @group_replication_group_name_save= @@GLOBAL.group_replication_group_name; |
| 136 |
SET @group_replication_gtid_assignment_block_size_save= @@GLOBAL.group_replication_gtid_assignment_block_size; |
| 137 |
SET @group_replication_group_seeds_save= @@GLOBAL.group_replication_group_seeds; |
| 138 |
SET @group_replication_local_address_save= @@GLOBAL.group_replication_local_address; |
| 139 |
SET @group_replication_poll_spin_loops_save= @@GLOBAL.group_replication_poll_spin_loops; |
| 140 |
SET @group_replication_recovery_complete_at_save= @@GLOBAL.group_replication_recovery_complete_at; |
| 141 |
SET @group_replication_recovery_reconnect_interval_save= @@GLOBAL.group_replication_recovery_reconnect_interval; |
| 142 |
SET @group_replication_recovery_retry_count_save= @@GLOBAL.group_replication_recovery_retry_count; |
| 143 |
SET @group_replication_recovery_ssl_ca_save= @@GLOBAL.group_replication_recovery_ssl_ca; |
| 144 |
SET @group_replication_recovery_ssl_capath_save= @@GLOBAL.group_replication_recovery_ssl_capath; |
| 145 |
SET @group_replication_recovery_ssl_cert_save= @@GLOBAL.group_replication_recovery_ssl_cert; |
| 146 |
SET @group_replication_recovery_ssl_cipher_save= @@GLOBAL.group_replication_recovery_ssl_cipher; |
| 147 |
SET @group_replication_recovery_ssl_crl_save= @@GLOBAL.group_replication_recovery_ssl_crl; |
| 148 |
SET @group_replication_recovery_ssl_crlpath_save= @@GLOBAL.group_replication_recovery_ssl_crlpath; |
| 149 |
SET @group_replication_recovery_ssl_key_save= @@GLOBAL.group_replication_recovery_ssl_key; |
| 150 |
SET @group_replication_recovery_ssl_verify_server_cert_save= @@GLOBAL.group_replication_recovery_ssl_verify_server_cert; |
| 151 |
SET @group_replication_recovery_use_ssl_save= @@GLOBAL.group_replication_recovery_use_ssl; |
| 152 |
SET @group_replication_single_primary_mode_save= @@GLOBAL.group_replication_single_primary_mode; |
| 153 |
SET @group_replication_ssl_mode_save= @@GLOBAL.group_replication_ssl_mode; |
| 154 |
SET @group_replication_start_on_boot_save= @@GLOBAL.group_replication_start_on_boot; |
| 155 |
SET @group_replication_recovery_public_key_path_save= @@GLOBAL.group_replication_recovery_public_key_path; |
| 156 |
SET @group_replication_recovery_get_public_key_save= @@GLOBAL.group_replication_recovery_get_public_key; |
| 157 |
|
| 158 |
## Set the GR Variables |
| 159 |
|
| 160 |
--write_file $MYSQL_TMP_DIR/set_variables.tmp |
| 161 |
SET GLOBAL group_replication_allow_local_lower_version_join= ON; |
| 162 |
SET GLOBAL group_replication_auto_increment_increment= 5; |
| 163 |
SET GLOBAL group_replication_bootstrap_group= 1; |
| 164 |
SET GLOBAL group_replication_components_stop_timeout= 10; |
| 165 |
SET GLOBAL group_replication_compression_threshold= 10; |
| 166 |
SET GLOBAL group_replication_enforce_update_everywhere_checks= OFF; |
| 167 |
SET GLOBAL group_replication_flow_control_applier_threshold= 50000; |
| 168 |
SET GLOBAL group_replication_flow_control_certifier_threshold= 50000; |
| 169 |
SET GLOBAL group_replication_flow_control_mode= "DISABLED"; |
| 170 |
SET GLOBAL group_replication_force_members= ""; |
| 171 |
SET GLOBAL group_replication_group_name= "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaab"; |
| 172 |
SET GLOBAL group_replication_group_seeds= CONCAT("localhost:",%XCOM_PORT%); |
| 173 |
SET GLOBAL group_replication_gtid_assignment_block_size= 2; |
| 174 |
SET GLOBAL group_replication_ip_allowlist= "AUTOMATIC"; |
| 175 |
SET GLOBAL group_replication_local_address= CONCAT("localhost:",%XCOM_PORT%); |
| 176 |
SET GLOBAL group_replication_poll_spin_loops= 10; |
| 177 |
SET GLOBAL group_replication_recovery_complete_at= TRANSACTIONS_CERTIFIED; |
| 178 |
SET GLOBAL group_replication_recovery_reconnect_interval= 20; |
| 179 |
SET GLOBAL group_replication_recovery_retry_count= 5; |
| 180 |
SET GLOBAL group_replication_recovery_ssl_ca= '%TEST_DIR%/std_data/cacert.pem'; |
| 181 |
SET GLOBAL group_replication_recovery_ssl_capath= '%TEST_DIR%/std_data'; |
| 182 |
SET GLOBAL group_replication_recovery_ssl_cert= '%TEST_DIR%/std_data/client-cert.pem'; |
| 183 |
SET GLOBAL group_replication_recovery_ssl_cipher= 'ECDHE-RSA-AES128-GCM-SHA256'; |
| 184 |
SET GLOBAL group_replication_recovery_ssl_crl= 'crl-client-revoked.crl'; |
| 185 |
SET GLOBAL group_replication_recovery_ssl_crlpath= '%TEST_DIR%/std_data'; |
| 186 |
SET GLOBAL group_replication_recovery_ssl_key= '%TEST_DIR%/std_data/client-key.pem'; |
| 187 |
SET GLOBAl group_replication_recovery_ssl_verify_server_cert= ON; |
| 188 |
SET GLOBAL group_replication_recovery_use_ssl= ON; |
| 189 |
SET GLOBAL group_replication_single_primary_mode= ON; |
| 190 |
SET GLOBAL group_replication_ssl_mode= "VERIFY_CA"; |
| 191 |
SET GLOBAL group_replication_start_on_boot= ON; |
| 192 |
SET GLOBAL group_replication_recovery_get_public_key= ON; |
| 193 |
SET GLOBAL group_replication_recovery_public_key_path= '%TEST_DIR%/std_data/rsa_public_key.pem'; |
| 194 |
|
| 195 |
EOF |
| 196 |
|
| 197 |
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $xcom_port xcom_port |
| 198 |
--exec $MYSQLXTEST --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256' -u root --port=$mysqlx_port1 --file=$MYSQL_TMP_DIR/set_variables.tmp -v %TEST_DIR%=$MYSQL_TEST_DIR -v %XCOM_PORT%=$xcom_port 2>&1 |
| 199 |
|
| 200 |
## Start GR |
| 201 |
|
| 202 |
## Using start gr command instead of start_group_replication.inc since |
| 203 |
## it resets the Group name set above. |
| 204 |
|
| 205 |
--source include/start_group_replication_command.inc |
| 206 |
|
| 207 |
--let $assert_text= group_replication_allow_local_lower_version_join is ON |
| 208 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_allow_local_lower_version_join]" = "1" |
| 209 |
--source include/assert.inc |
| 210 |
|
| 211 |
--let $assert_text= group_replication_auto_increment_increment is 5 |
| 212 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_auto_increment_increment]" = "5" |
| 213 |
--source include/assert.inc |
| 214 |
|
| 215 |
--let $assert_text= group_replication_components_stop_timeout is 10 |
| 216 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_components_stop_timeout]" = "10" |
| 217 |
--source include/assert.inc |
| 218 |
|
| 219 |
--let $assert_text= group_replication_compression_threshold is 10 |
| 220 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_compression_threshold]" = "10" |
| 221 |
--source include/assert.inc |
| 222 |
|
| 223 |
--let $assert_text= group_replication_enforce_update_everywhere_checks is OFF |
| 224 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_enforce_update_everywhere_checks]" = "0" |
| 225 |
--source include/assert.inc |
| 226 |
|
| 227 |
--let $assert_text= group_replication_flow_control_applier_threshold is 50000 |
| 228 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_applier_threshold]" = "50000" |
| 229 |
--source include/assert.inc |
| 230 |
|
| 231 |
--let $assert_text= group_replication_flow_control_certifier_threshold is 50000 |
| 232 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold]" = "50000" |
| 233 |
--source include/assert.inc |
| 234 |
|
| 235 |
--let $assert_text= group_replication_flow_control_mode is DISABLED |
| 236 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "DISABLED" |
| 237 |
--source include/assert.inc |
| 238 |
|
| 239 |
--let $assert_text= group_replication_force_members is "" |
| 240 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_force_members]" = "" |
| 241 |
--source include/assert.inc |
| 242 |
|
| 243 |
--let $assert_text= group_replication_group_name is aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaab |
| 244 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_group_name]" = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaab" |
| 245 |
--source include/assert.inc |
| 246 |
|
| 247 |
--let $assert_text= group_replication_group_seeds is 127.0.0.1:xcom_port |
| 248 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_group_seeds]" = "localhost:$xcom_port" |
| 249 |
--source include/assert.inc |
| 250 |
|
| 251 |
--let $assert_text= group_replication_gtid_assignment_block_size is 2 |
| 252 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_gtid_assignment_block_size]" = "2" |
| 253 |
--source include/assert.inc |
| 254 |
|
| 255 |
--let $assert_text= group_replication_ip_allowlist is AUTOMATIC |
| 256 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ip_allowlist]" = "AUTOMATIC" |
| 257 |
--source include/assert.inc |
| 258 |
|
| 259 |
--let $assert_text= group_replication_local_address is 127.0.0.1:xcom_port |
| 260 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_local_address]" = "localhost:$xcom_port" |
| 261 |
--source include/assert.inc |
| 262 |
|
| 263 |
--let $assert_text= group_replication_recovery_complete_at is TRANSACTIONS_CERTIFIED |
| 264 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_complete_at]" = "TRANSACTIONS_CERTIFIED" |
| 265 |
--source include/assert.inc |
| 266 |
|
| 267 |
--let $assert_text= group_replication_recovery_reconnect_interval is 20 |
| 268 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_reconnect_interval]" = "20" |
| 269 |
--source include/assert.inc |
| 270 |
|
| 271 |
--let $assert_text= group_replication_recovery_retry_count is 5 |
| 272 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_retry_count]" = "5" |
| 273 |
--source include/assert.inc |
| 274 |
|
| 275 |
--let $assert_text= group_replication_recovery_ssl_ca is MYSQL_TEST_DIR/std_data/cacert.pem |
| 276 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_ca]" = "$MYSQL_TEST_DIR/std_data/cacert.pem" |
| 277 |
--source include/assert.inc |
| 278 |
|
| 279 |
--let $assert_text= group_replication_recovery_ssl_capath is MYSQL_TEST_DIR/std_data |
| 280 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_capath]" = "$MYSQL_TEST_DIR/std_data" |
| 281 |
--source include/assert.inc |
| 282 |
|
| 283 |
--let $assert_text= group_replication_recovery_ssl_cert is MYSQL_TEST_DIR/std_data/client-cert.pem |
| 284 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_cert]" = "$MYSQL_TEST_DIR/std_data/client-cert.pem" |
| 285 |
--source include/assert.inc |
| 286 |
|
| 287 |
--let $assert_text= group_replication_recovery_ssl_cipher is ECDHE-RSA-AES128-GCM-SHA256 |
| 288 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_cipher]" = "ECDHE-RSA-AES128-GCM-SHA256" |
| 289 |
--source include/assert.inc |
| 290 |
|
| 291 |
--let $assert_text= group_replication_recovery_ssl_crl is crl-client-revoked.crl |
| 292 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_crl]" = "crl-client-revoked.crl" |
| 293 |
--source include/assert.inc |
| 294 |
|
| 295 |
--let $assert_text= group_replication_recovery_ssl_crlpath is MYSQL_TEST_DIR/std_data |
| 296 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_crlpath]" = "$MYSQL_TEST_DIR/std_data" |
| 297 |
--source include/assert.inc |
| 298 |
|
| 299 |
--let $assert_text= group_replication_recovery_ssl_key is MYSQL_TEST_DIR/std_data/client-key.pem |
| 300 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_key]" = "$MYSQL_TEST_DIR/std_data/client-key.pem" |
| 301 |
--source include/assert.inc |
| 302 |
|
| 303 |
--let $assert_text= group_replication_recovery_ssl_verify_server_cert is ON |
| 304 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_ssl_verify_server_cert]" = "1" |
| 305 |
--source include/assert.inc |
| 306 |
|
| 307 |
--let $assert_text= group_replication_recovery_use_ssl is ON |
| 308 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_use_ssl]" = "1" |
| 309 |
--source include/assert.inc |
| 310 |
|
| 311 |
--let $assert_text= group_replication_single_primary_mode is ON |
| 312 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_single_primary_mode]" = "1" |
| 313 |
--source include/assert.inc |
| 314 |
|
| 315 |
--let $assert_text= group_replication_start_on_boot is ON |
| 316 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_start_on_boot]" = "1" |
| 317 |
--source include/assert.inc |
| 318 |
|
| 319 |
--let $assert_text= group_replication_ssl_mode is VERIFY_CA |
| 320 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_ssl_mode]" = "VERIFY_CA" |
| 321 |
--source include/assert.inc |
| 322 |
|
| 323 |
--let $assert_text= group_replication_recovery_public_key_path is MYSQL_TEST_DIR/std_data/rsa_public_key.pem |
| 324 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_public_key_path]" = "$MYSQL_TEST_DIR/std_data/rsa_public_key.pem" |
| 325 |
--source include/assert.inc |
| 326 |
|
| 327 |
--let $assert_text= group_replication_recovery_get_public_key is ON |
| 328 |
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_recovery_get_public_key]" = "1" |
| 329 |
--source include/assert.inc |
| 330 |
|
| 331 |
# Creating temp file to stop GR. |
| 332 |
--write_file $MYSQL_TMP_DIR/stop_group_replication.tmp |
| 333 |
-->stmtsql STOP GROUP_REPLICATION; |
| 334 |
-->recvresult |
| 335 |
EOF |
| 336 |
|
| 337 |
## Stop GR on Server1 |
| 338 |
--echo Stopping GR on server 1 |
| 339 |
--exec $MYSQLXTEST --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256' -u root --port=$mysqlx_port1 --file=$MYSQL_TMP_DIR/stop_group_replication.tmp 2>&1 |
| 340 |
|
| 341 |
## Wait for member state to be OFFLINE. |
| 342 |
--let $group_replication_member_state= OFFLINE |
| 343 |
--source include/gr_wait_for_member_state.inc |
| 344 |
--source include/assert_and_disable_read_only.inc |
| 345 |
|
| 346 |
## Modify the GLOBAL variables to its original value |
| 347 |
|
| 348 |
SET GLOBAL group_replication_allow_local_lower_version_join= @group_replication_allow_local_lower_version_join_save; |
| 349 |
SET GLOBAL group_replication_auto_increment_increment= @group_replication_auto_increment_increment_save; |
| 350 |
SET GLOBAL group_replication_components_stop_timeout= @group_replication_components_stop_timeout_save; |
| 351 |
SET GLOBAL group_replication_compression_threshold= @group_replication_compression_threshold_save; |
| 352 |
SET GLOBAL group_replication_flow_control_applier_threshold= @group_replication_flow_control_applier_threshold_save; |
| 353 |
SET GLOBAL group_replication_flow_control_certifier_threshold= @group_replication_flow_control_certifier_threshold_save; |
| 354 |
SET GLOBAL group_replication_flow_control_mode= @group_replication_flow_control_mode_save; |
| 355 |
SET GLOBAL group_replication_group_name =@group_replication_group_name_save; |
| 356 |
SET GLOBAL group_replication_group_seeds= @group_replication_group_seeds_save; |
| 357 |
SET GLOBAL group_replication_gtid_assignment_block_size= @group_replication_gtid_assignment_block_size_save; |
| 358 |
SET GLOBAL group_replication_local_address= @group_replication_local_address_save; |
| 359 |
SET GLOBAL group_replication_group_seeds= @group_replication_group_seeds_save; |
| 360 |
SET GLOBAL group_replication_recovery_complete_at= @group_replication_recovery_complete_at_save; |
| 361 |
SET GLOBAL group_replication_poll_spin_loops= @group_replication_poll_spin_loops_save; |
| 362 |
SET GLOBAL group_replication_recovery_reconnect_interval= @group_replication_recovery_reconnect_interval_save; |
| 363 |
SET GLOBAL group_replication_recovery_retry_count= @group_replication_recovery_retry_count_save; |
| 364 |
SET GLOBAL group_replication_recovery_ssl_ca= @group_replication_recovery_ssl_ca_save; |
| 365 |
SET GLOBAL group_replication_recovery_ssl_capath= @group_replication_recovery_ssl_capath_save; |
| 366 |
SET GLOBAL group_replication_recovery_ssl_cert= @group_replication_recovery_ssl_cert_save; |
| 367 |
SET GLOBAL group_replication_recovery_ssl_cipher= @group_replication_recovery_ssl_cipher_save; |
| 368 |
SET GLOBAL group_replication_recovery_ssl_crl= @group_replication_recovery_ssl_crl_save; |
| 369 |
SET GLOBAL group_replication_recovery_ssl_crlpath= @group_replication_recovery_ssl_crlpath_save; |
| 370 |
SET GLOBAL group_replication_recovery_ssl_key= @group_replication_recovery_ssl_key_save; |
| 371 |
SET GLOBAL group_replication_recovery_ssl_verify_server_cert= @group_replication_recovery_ssl_verify_server_cert_save; |
| 372 |
SET GLOBAL group_replication_recovery_use_ssl= @group_replication_recovery_use_ssl_save; |
| 373 |
SET GLOBAL group_replication_single_primary_mode= @group_replication_single_primary_mode_save; |
| 374 |
SET GLOBAL group_replication_ssl_mode= @group_replication_ssl_mode_save; |
| 375 |
SET GLOBAL group_replication_start_on_boot= @group_replication_start_on_boot_save; |
| 376 |
SET GLOBAL group_replication_enforce_update_everywhere_checks= @group_replication_enforce_update_everywhere_checks_save; |
| 377 |
SET GLOBAL group_replication_recovery_public_key_path= @group_replication_recovery_public_key_path_save; |
| 378 |
SET GLOBAL group_replication_recovery_get_public_key= @group_replication_recovery_get_public_key_save; |
| 379 |
|
| 380 |
## See if GR is able to start after resetting the values. |
| 381 |
--exec $MYSQLXTEST --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256' -u root --port=$mysqlx_port1 --file=$MYSQL_TMP_DIR/bootstrap_server.tmp 2>&1 |
| 382 |
--let $group_replication_member_state= ONLINE |
| 383 |
--source include/gr_wait_for_member_state.inc |
| 384 |
|
| 385 |
## Stop GR |
| 386 |
--exec $MYSQLXTEST --ssl-cipher='ECDHE-RSA-AES128-GCM-SHA256' -u root --port=$mysqlx_port1 --file=$MYSQL_TMP_DIR/stop_group_replication.tmp 2>&1 |
| 387 |
--let $rpl_connection_name= server1 |
| 388 |
--source include/rpl_connection.inc |
| 389 |
--let $group_replication_member_state= OFFLINE |
| 390 |
--source include/gr_wait_for_member_state.inc |
| 391 |
--source include/assert_and_disable_read_only.inc |
| 392 |
|
| 393 |
## Clean-up |
| 394 |
--remove_file $MYSQL_TMP_DIR/bootstrap_server.tmp |
| 395 |
--remove_file $MYSQL_TMP_DIR/set_variables.tmp |
| 396 |
--remove_file $MYSQL_TMP_DIR/stop_group_replication.tmp |
| 397 |
|
| 398 |
--source include/group_replication_end.inc |