| 1 |
############################################################################### |
| 2 |
# This test verifies what happens when you don't have the clone plugin |
| 3 |
# installed in the joiner or the donor server. |
| 4 |
# |
| 5 |
# 0. The test requires two servers: M1 and M2. |
| 6 |
# 1. Start group replication on server1 and add some data |
| 7 |
# 2. Configure the threshold on server 2 and start GR |
| 8 |
# Distributed recovery is used as the clone plugin is not installed in the joiner |
| 9 |
# 3. Install the clone plugin in the joiner and start GR |
| 10 |
# The joiner tries using clone when it is not installed in the donor |
| 11 |
# Distributed recovery is used as the clone process errors out |
| 12 |
# 4. Cleanup |
| 13 |
# |
| 14 |
|
| 15 |
--source include/have_clone_plugin.inc |
| 16 |
--source include/have_group_replication_plugin.inc |
| 17 |
--let $rpl_skip_group_replication_start= 1 |
| 18 |
--source include/group_replication.inc |
| 19 |
|
| 20 |
--echo |
| 21 |
--echo ######################################################### |
| 22 |
--echo # 1. Start group replication on server1 and add some data |
| 23 |
|
| 24 |
--let $rpl_connection_name= server1 |
| 25 |
--source include/rpl_connection.inc |
| 26 |
|
| 27 |
--source include/start_and_bootstrap_group_replication.inc |
| 28 |
|
| 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 |
|
| 33 |
--source include/rpl_sync.inc |
| 34 |
|
| 35 |
--echo |
| 36 |
--echo ############################################################### |
| 37 |
--echo # 2. Configure the threshold on server 2 and start GR |
| 38 |
--echo # Distributed recovery is used as the clone plugin |
| 39 |
--echo # is not installed in the joiner |
| 40 |
|
| 41 |
--let $rpl_connection_name= server2 |
| 42 |
--source include/rpl_connection.inc |
| 43 |
|
| 44 |
--let $_group_replication_threshold_save= `SELECT @@GLOBAL.group_replication_clone_threshold` |
| 45 |
SET GLOBAL group_replication_clone_threshold= 1; |
| 46 |
|
| 47 |
--source include/start_group_replication.inc |
| 48 |
|
| 49 |
# Verify in the log file that the plugin is not installed |
| 50 |
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err |
| 51 |
--let $assert_text = Clone plugin is not present |
| 52 |
--let $assert_select = There was an issue when configuring the remote cloning process: The clone plugin is not present or active in this server. |
| 53 |
--let $assert_count = 1 |
| 54 |
--source include/assert_grep.inc |
| 55 |
|
| 56 |
--echo |
| 57 |
--echo ####################################################################### |
| 58 |
--echo # 3. Install the clone plugin in the joiner and start GR |
| 59 |
--echo # The joiner tries using clone when it is not installed in the donor |
| 60 |
--echo # Distributed recovery is used as the clone process errors out |
| 61 |
|
| 62 |
--source include/stop_group_replication.inc |
| 63 |
|
| 64 |
--let $rpl_connection_name= server1 |
| 65 |
--source include/rpl_connection.inc |
| 66 |
|
| 67 |
INSERT INTO t1 VALUES (3); |
| 68 |
|
| 69 |
--let $rpl_connection_name= server2 |
| 70 |
--source include/rpl_connection.inc |
| 71 |
|
| 72 |
--replace_result $CLONE_PLUGIN CLONE_PLUGIN |
| 73 |
--eval INSTALL PLUGIN clone SONAME '$CLONE_PLUGIN' |
| 74 |
|
| 75 |
--source include/start_group_replication.inc |
| 76 |
|
| 77 |
# Verify in the log file that clone failed |
| 78 |
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err |
| 79 |
--let $assert_text = Clone plugin is not present in the donor |
| 80 |
--let $assert_select = There was an issue when cloning from another server: Error number: 3862 Error message: Clone Donor Error: 1524 : Plugin 'clone' is not loaded. |
| 81 |
--let $assert_count = 1 |
| 82 |
--source include/assert_grep.inc |
| 83 |
|
| 84 |
--echo |
| 85 |
--echo ############################################################ |
| 86 |
--echo # 4. Cleanup |
| 87 |
|
| 88 |
--eval SET GLOBAL group_replication_clone_threshold= $_group_replication_threshold_save; |
| 89 |
|
| 90 |
DROP TABLE t1; |
| 91 |
|
| 92 |
--source include/rpl_sync.inc |
| 93 |
|
| 94 |
UNINSTALL PLUGIN clone; |
| 95 |
|
| 96 |
set session sql_log_bin=0; |
| 97 |
call mtr.add_suppression("This member will start distributed recovery using clone. It is due to the number of missing transactions being higher than the configured threshold of*"); |
| 98 |
call mtr.add_suppression("There was an issue when configuring the remote cloning process: The clone plugin is not present or active*"); |
| 99 |
call mtr.add_suppression("There was an issue when cloning from another server: Error number: 3862 Error message: Clone Donor Error: 1524 : Plugin 'clone' is not loaded"); |
| 100 |
call mtr.add_suppression("Internal query: CLONE INSTANCE FROM \'root\'@\'127.0.0.1\':[0-9]+ IDENTIFIED BY \'\\*\\*\\*\\*\\*\' REQUIRE NO SSL; result in error. Error number:*"); |
| 101 |
call mtr.add_suppression("Due to some issue on the previous step distributed recovery is now executing: Incremental Recovery."); |
| 102 |
set session sql_log_bin=1; |
| 103 |
|
| 104 |
--source include/group_replication_end.inc |