include/rpl_init.inc [topology=3->2,1->2] Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. 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. Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. 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. [connection server_2] SET @save.replica_parallel_workers= @@global.replica_parallel_workers; # Test for Single Threaded Slave SET GLOBAL replica_parallel_workers= 0; Warnings: Warning 1287 '0' is deprecated and will be removed in a future release. Please use 1 instead START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead # 1) Create a database on server_1. [connection server_1] CREATE DATABASE db1; # 2) create database on server_3. [connection server_3] CREATE DATABASE db3; # 3) sync the slave (server_2) with both masters (server_1 and server_3). [connection server_1] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1'] [connection server_3] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3'] include/stop_slave.inc [FOR CHANNEL 'channel_3'] include/start_slave.inc [FOR CHANNEL 'channel_3'] SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration; CHANNEL_NAME channel_3 channel_1 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration ORDER BY CHANNEL_NAME; CHANNEL_NAME channel_1 channel_3 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status; CHANNEL_NAME channel_3 channel_1 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status ORDER BY CHANNEL_NAME; CHANNEL_NAME channel_1 channel_3 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status; CHANNEL_NAME LAST_ERROR_MESSAGE channel_3 channel_1 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status ORDER BY CHANNEL_NAME; CHANNEL_NAME LAST_ERROR_MESSAGE channel_1 channel_3 SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration; CHANNEL_NAME TLS_VERSION channel_3 channel_1 SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration ORDER BY CHANNEL_NAME; CHANNEL_NAME TLS_VERSION channel_1 channel_3 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker; CHANNEL_NAME LAST_ERROR_MESSAGE channel_3 channel_1 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker ORDER BY CHANNEL_NAME; CHANNEL_NAME LAST_ERROR_MESSAGE channel_1 channel_3 [connection server_1] DROP DATABASE db1; [connection server_3] DROP DATABASE db3; [connection server_1] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1'] [connection server_3] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3'] # Test for Multi Threaded Slave STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead SET GLOBAL replica_parallel_workers = 2; START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead # 1) Create a database on server_1. [connection server_1] CREATE DATABASE db1; # 2) create database on server_3. [connection server_3] CREATE DATABASE db3; # 3) sync the slave (server_2) with both masters (server_1 and server_3). [connection server_1] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1'] [connection server_3] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3'] include/stop_slave.inc [FOR CHANNEL 'channel_3'] include/start_slave.inc [FOR CHANNEL 'channel_3'] SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration; CHANNEL_NAME channel_3 channel_1 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration ORDER BY CHANNEL_NAME; CHANNEL_NAME channel_1 channel_3 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status; CHANNEL_NAME channel_3 channel_1 SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status ORDER BY CHANNEL_NAME; CHANNEL_NAME channel_1 channel_3 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status; CHANNEL_NAME LAST_ERROR_MESSAGE channel_3 channel_1 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status ORDER BY CHANNEL_NAME; CHANNEL_NAME LAST_ERROR_MESSAGE channel_1 channel_3 SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration; CHANNEL_NAME TLS_VERSION channel_3 channel_1 SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration ORDER BY CHANNEL_NAME; CHANNEL_NAME TLS_VERSION channel_1 channel_3 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_coordinator; CHANNEL_NAME LAST_ERROR_MESSAGE channel_3 channel_1 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_coordinator ORDER BY CHANNEL_NAME; CHANNEL_NAME LAST_ERROR_MESSAGE channel_1 channel_3 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker; CHANNEL_NAME LAST_ERROR_MESSAGE channel_3 channel_3 channel_1 channel_1 SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker ORDER BY CHANNEL_NAME; CHANNEL_NAME LAST_ERROR_MESSAGE channel_1 channel_1 channel_3 channel_3 [connection server_1] DROP DATABASE db1; [connection server_3] DROP DATABASE db3; [connection server_1] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1'] [connection server_3] include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3'] STOP SLAVE; Warnings: Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead SET @@global.replica_parallel_workers= @save.replica_parallel_workers; START SLAVE; Warnings: Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead include/rpl_end.inc RESET REPLICA ALL FOR CHANNEL 'channel_3'; RESET REPLICA ALL FOR CHANNEL 'channel_1';