| 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 |
############################################################ |
| 8 |
# 1. Install clone plugin on server1. |
| 9 |
[connection server1] |
| 10 |
INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; |
| 11 |
|
| 12 |
############################################################ |
| 13 |
# 2. Bootstrap server1 and add some data |
| 14 |
include/start_and_bootstrap_group_replication.inc |
| 15 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 16 |
INSERT INTO t1 VALUES (1); |
| 17 |
INSERT INTO t1 VALUES (2); |
| 18 |
|
| 19 |
####################################################################### |
| 20 |
# 3. Restart server 2 with a monitoring process (mysqld_safe) if needed |
| 21 |
# Remove the default channel from server1 to server2 |
| 22 |
[connection server2] |
| 23 |
RESET SLAVE ALL; |
| 24 |
Warnings: |
| 25 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 26 |
include/spawn_monitoring_process.inc |
| 27 |
|
| 28 |
############################################################ |
| 29 |
# 4. Setup the server so group replication starts on boot |
| 30 |
# Install the Clone plugin |
| 31 |
CHANGE REPLICATION SOURCE TO SOURCE_USER="root" FOR CHANNEL "group_replication_recovery"; |
| 32 |
Warnings: |
| 33 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 34 |
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. |
| 35 |
INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; |
| 36 |
|
| 37 |
############################################################ |
| 38 |
# 5. Create a new channel from server 3 into server 2 |
| 39 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=SERVER_3_PORT for channel 'ch3_2'; |
| 40 |
Warnings: |
| 41 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 42 |
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. |
| 43 |
|
| 44 |
############################################################ |
| 45 |
# 6. Restart the server making it use clone on start |
| 46 |
# Check that clone goes ok |
| 47 |
SET PERSIST group_replication_clone_threshold= 1; |
| 48 |
RESTART; |
| 49 |
include/rpl_reconnect.inc |
| 50 |
[connection server2] |
| 51 |
include/gr_wait_for_member_state.inc |
| 52 |
include/assert.inc [Clone must be completed] |
| 53 |
include/diff_tables.inc [server1:test.t1 ,server2:test.t1] |
| 54 |
|
| 55 |
############################################################ |
| 56 |
# 7. Check the channel threads failed to start due to clone |
| 57 |
include/assert_grep.inc [The applier thread for channel ch3_2 failed to start] |
| 58 |
include/assert_grep.inc [The IO thread for channel ch3_2 failed to start] |
| 59 |
|
| 60 |
############################################################ |
| 61 |
# 8. Cleanup |
| 62 |
RESET PERSIST IF EXISTS group_replication_group_name; |
| 63 |
RESET PERSIST IF EXISTS group_replication_local_address; |
| 64 |
RESET PERSIST IF EXISTS group_replication_group_seeds; |
| 65 |
RESET PERSIST IF EXISTS group_replication_start_on_boot; |
| 66 |
RESET PERSIST IF EXISTS group_replication_clone_threshold; |
| 67 |
RESET PERSIST IF EXISTS group_replication_communication_stack; |
| 68 |
SET GLOBAL group_replication_clone_threshold= 9223372036854775807; |
| 69 |
DROP TABLE t1; |
| 70 |
include/rpl_sync.inc |
| 71 |
set session sql_log_bin=0; |
| 72 |
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*"); |
| 73 |
call mtr.add_suppression("The 'replica IO' thread of channel 'ch3_2' will error out as the server will attempt to clone another server"); |
| 74 |
call mtr.add_suppression("The 'replica applier' thread of channel 'ch3_2' will error out as the server will attempt to clone another server"); |
| 75 |
call mtr.add_suppression("Run function 'thread_start' in plugin 'group_replication' failed"); |
| 76 |
call mtr.add_suppression("Run function 'applier_start' in plugin 'group_replication' failed"); |
| 77 |
call mtr.add_suppression("Replica I/O for channel 'ch3_2': Fatal error: Failed to run 'thread_start' hook, Error_code: MY-013117"); |
| 78 |
call mtr.add_suppression("Replica SQL for channel 'ch3_2': Fatal error: Failed to run 'applier_start' hook, Error_code: MY-013117"); |
| 79 |
call mtr.add_suppression("Clone removing all user data for provisioning: Started"); |
| 80 |
call mtr.add_suppression("Clone removing all user data for provisioning: Finished"); |
| 81 |
set session sql_log_bin=1; |
| 82 |
UNINSTALL PLUGIN clone; |
| 83 |
include/clean_monitoring_process.inc |
| 84 |
SET GLOBAL group_replication_start_on_boot= START_ON_BOOT_VALUE; |
| 85 |
[connection server1] |
| 86 |
UNINSTALL PLUGIN clone; |
| 87 |
include/group_replication_end.inc |