79 lines
3.4 KiB
Plaintext
79 lines
3.4 KiB
Plaintext
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 master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
|
|
[connection master]
|
|
CREATE TABLE ils_copy (
|
|
uuid VARCHAR(36) PRIMARY KEY,
|
|
master JSON NOT NULL,
|
|
channels JSON NOT NULL,
|
|
storage_engines JSON NOT NULL);
|
|
CREATE TABLE t1_innodb (c1 INT);
|
|
CREATE TABLE t2_myisam (c1 INT) ENGINE=MyISAM;
|
|
include/sync_slave_sql_with_master.inc
|
|
# Adding debug point 'pause_collecting_instance_logs_info' to @@GLOBAL.debug
|
|
CHANGE MASTER TO MASTER_HOST = '127.0.0.1' FOR CHANNEL 'ch1';
|
|
CALL mtr.add_suppression('Unsafe statement written to the binary log');
|
|
include/save_master_pos.inc
|
|
[connection slave1]
|
|
FLUSH TABLES test.t2_myisam, performance_schema.threads WITH READ LOCK;
|
|
[connection slave]
|
|
SELECT * FROM performance_schema.log_status INTO OUTFILE 'ILS_DUMP';
|
|
[connection slave1]
|
|
SET DEBUG_SYNC='now WAIT_FOR reached_collecting_instance_logs_info';
|
|
[connection server_2_1]
|
|
FLUSH LOCAL BINARY LOGS;;
|
|
[connection server_2_2]
|
|
SET @@GLOBAL.gtid_purged = '+00000000-0000-0000-0000-000000000000:1-999';
|
|
[connection server_2_3]
|
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1' FOR CHANNEL 'ch2';
|
|
[connection server_2_4]
|
|
RESET SLAVE ALL FOR CHANNEL 'ch1';
|
|
[connection server_2_5]
|
|
SET @sql_log_bin = 0;
|
|
INSERT INTO t1_innodb VALUE (9);
|
|
[connection server_2_6]
|
|
SET @sql_log_bin = 0;
|
|
INSERT INTO t2_myisam VALUE (9);
|
|
[connection master]
|
|
FLUSH BINARY LOGS;
|
|
INSERT INTO t1_innodb VALUES (1);
|
|
INSERT INTO t2_myisam VALUES (1);
|
|
FLUSH BINARY LOGS;
|
|
INSERT INTO t1_innodb VALUES (2);
|
|
INSERT INTO t2_myisam VALUES (2);
|
|
[connection slave1]
|
|
Wait until all threads expecting to be block be doing something
|
|
[connection slave1]
|
|
SET DEBUG_SYNC='now SIGNAL continue_collecting_instance_logs_info';
|
|
UNLOCK TABLES;
|
|
[connection slave]
|
|
LOAD DATA INFILE 'ILS_DUMP' INTO TABLE ils_copy;
|
|
[connection server_2_1]
|
|
[connection server_2_2]
|
|
[connection server_2_3]
|
|
[connection server_2_4]
|
|
[connection server_2_5]
|
|
[connection server_2_6]
|
|
[connection slave1]
|
|
Wait until all blocked threads are released and finish
|
|
[connection slave]
|
|
include/assert.inc [Collected server UUID is correct]
|
|
include/assert.inc [Collected master binary log file name is correct]
|
|
include/assert.inc [Collected master binary log file position is correct]
|
|
include/assert.inc [Collected master gtid_executed is correct]
|
|
include/assert.inc [Collected default replication channel name is correct]
|
|
include/assert.inc [Collected default replication channel relay log file name is correct]
|
|
include/assert.inc [Collected default replication channel relay log file position is correct]
|
|
include/assert.inc [Collected replication channel name for ch1 is correct]
|
|
include/assert.inc [Collected replication channel relay log file name for ch1 is correct]
|
|
include/assert.inc [There is no other channel information collected (no ch2)]
|
|
include/assert.inc [Collected InnoDB LSN is in correct boundaries]
|
|
include/assert.inc [Collected InnoDB LSN_checkpoint is in correct boundaries]
|
|
[connection slave]
|
|
# Removing debug point 'pause_collecting_instance_logs_info' from @@GLOBAL.debug
|
|
RESET SLAVE ALL FOR CHANNEL 'ch2';
|
|
[connection master]
|
|
DROP TABLE ils_copy, t1_innodb, t2_myisam;
|
|
include/rpl_end.inc
|