1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
include/master-slave.inc
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 master]
[connection slave]
CALL mtr.add_suppression('Replica failed to initialize connection metadata structure from the repository');
CALL mtr.add_suppression('This operation cannot be performed with a running replica');
CALL mtr.add_suppression('Could not find target log file mentioned in applier metadata in the index file');
CALL mtr.add_suppression('Could not find relay log file');
CALL mtr.add_suppression('A replica with the same server_uuid/server_id as this replica has connected to the source');
SET @saved_event_scheduler= @@GLOBAL.event_scheduler;
SET @saved_relay_log_purge= @@GLOBAL.relay_log_purge;
SET @@GLOBAL.event_scheduler= OFF;
include/stop_slave.inc
CREATE EVENT e_change_master_io_ch0 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_HOST='127.0.0.1', SOURCE_PORT=SOURCE_PORT FOR CHANNEL '';
CREATE EVENT e_change_master_sql_ch0 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO RELAY_LOG_FILE='slave-relay-bin.000001', RELAY_LOG_POS=4 FOR CHANNEL '';
CREATE EVENT e_start_slave_io_ch0 ON SCHEDULE EVERY 1 SECOND DO START SLAVE IO_THREAD FOR CHANNEL '';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_io_ch0 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE IO_THREAD FOR CHANNEL '';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_reset_slave_ch0 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE FOR CHANNEL '';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_reset_slave_all_ch0 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE ALL FOR CHANNEL '';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_start_slave_sql_ch0 ON SCHEDULE EVERY 1 SECOND DO START SLAVE SQL_THREAD FOR CHANNEL '';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_sql_ch0 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE SQL_THREAD FOR CHANNEL '';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_sss_ch0 ON SCHEDULE EVERY 1 SECOND DO SHOW SLAVE STATUS FOR CHANNEL '';
Warnings:
Warning 1287 'SHOW SLAVE STATUS' is deprecated and will be removed in a future release. Please use SHOW REPLICA STATUS instead
CREATE EVENT e_reset_master ON SCHEDULE EVERY 1 SECOND DO RESET MASTER;
CREATE EVENT e_ils ON SCHEDULE EVERY 1 SECOND DO SELECT * FROM performance_schema.log_status;
CREATE EVENT e_change_master_io_ch1 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_HOST='127.0.0.1', SOURCE_PORT=SOURCE_PORT FOR CHANNEL 'ch1';
CREATE EVENT e_change_master_sql_ch1 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO RELAY_LOG_FILE='slave-relay-bin-ch1.000001', RELAY_LOG_POS=4 FOR CHANNEL 'ch1';
CREATE EVENT e_start_slave_io_ch1 ON SCHEDULE EVERY 1 SECOND DO START SLAVE IO_THREAD FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_io_ch1 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE IO_THREAD FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_reset_slave_ch1 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_reset_slave_all_ch1 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE ALL FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_start_slave_sql_ch1 ON SCHEDULE EVERY 1 SECOND DO START SLAVE SQL_THREAD FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_sql_ch1 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE SQL_THREAD FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_sss_ch1 ON SCHEDULE EVERY 1 SECOND DO SHOW SLAVE STATUS FOR CHANNEL 'ch1';
Warnings:
Warning 1287 'SHOW SLAVE STATUS' is deprecated and will be removed in a future release. Please use SHOW REPLICA STATUS instead
CREATE EVENT e_change_master_io_ch2 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_HOST='127.0.0.1', SOURCE_PORT=SOURCE_PORT FOR CHANNEL 'ch2';
CREATE EVENT e_change_master_sql_ch2 ON SCHEDULE EVERY 1 SECOND DO CHANGE REPLICATION SOURCE TO RELAY_LOG_FILE='slave-relay-bin-ch2.000001', RELAY_LOG_POS=4 FOR CHANNEL 'ch2';
CREATE EVENT e_start_slave_io_ch2 ON SCHEDULE EVERY 1 SECOND DO START SLAVE IO_THREAD FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_io_ch2 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE IO_THREAD FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_reset_slave_ch2 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_reset_slave_all_ch2 ON SCHEDULE EVERY 1 SECOND DO RESET SLAVE ALL FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
CREATE EVENT e_start_slave_sql_ch2 ON SCHEDULE EVERY 1 SECOND DO START SLAVE SQL_THREAD FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
CREATE EVENT e_stop_slave_sql_ch2 ON SCHEDULE EVERY 1 SECOND DO STOP SLAVE SQL_THREAD FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
CREATE EVENT e_sss_ch2 ON SCHEDULE EVERY 1 SECOND DO SHOW SLAVE STATUS FOR CHANNEL 'ch2';
Warnings:
Warning 1287 'SHOW SLAVE STATUS' is deprecated and will be removed in a future release. Please use SHOW REPLICA STATUS instead
SET @@GLOBAL.event_scheduler= ON;
Let the requests to run in parallel for 10 seconds
DROP EVENT e_sss_ch2;
DROP EVENT e_stop_slave_sql_ch2;
DROP EVENT e_start_slave_sql_ch2;
DROP EVENT e_reset_slave_all_ch2;
DROP EVENT e_reset_slave_ch2;
DROP EVENT e_stop_slave_io_ch2;
DROP EVENT e_start_slave_io_ch2;
DROP EVENT e_change_master_sql_ch2;
DROP EVENT e_change_master_io_ch2;
DROP EVENT e_sss_ch1;
DROP EVENT e_stop_slave_sql_ch1;
DROP EVENT e_start_slave_sql_ch1;
DROP EVENT e_reset_slave_all_ch1;
DROP EVENT e_reset_slave_ch1;
DROP EVENT e_stop_slave_io_ch1;
DROP EVENT e_start_slave_io_ch1;
DROP EVENT e_change_master_sql_ch1;
DROP EVENT e_change_master_io_ch1;
DROP EVENT e_ils;
DROP EVENT e_reset_master;
DROP EVENT e_sss_ch0;
DROP EVENT e_stop_slave_sql_ch0;
DROP EVENT e_start_slave_sql_ch0;
DROP EVENT e_reset_slave_all_ch0;
DROP EVENT e_reset_slave_ch0;
DROP EVENT e_stop_slave_io_ch0;
DROP EVENT e_start_slave_io_ch0;
DROP EVENT e_change_master_sql_ch0;
DROP EVENT e_change_master_io_ch0;
SET @@GLOBAL.event_scheduler= OFF;
# Wait until all scheduler activity has finished
STOP SLAVE FOR CHANNEL 'ch2';
STOP SLAVE FOR CHANNEL 'ch1';
STOP SLAVE FOR CHANNEL '';
RESET SLAVE ALL;
CHANGE REPLICATION SOURCE TO SOURCE_USER='root', SOURCE_HOST='127.0.0.1', SOURCE_PORT=SOURCE_PORT;
SET @@GLOBAL.event_scheduler = @saved_event_scheduler;
SET @@GLOBAL.relay_log_purge = @saved_relay_log_purge;
include/start_slave.inc
include/rpl_end.inc
|