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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
--source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
# Test requires master-info-repository=TABLE, relay-log-info-repository=TABLE
--source include/have_slave_repository_type_table.inc
--source include/only_mts_replica_parallel_workers.inc
--let $save_replica_parallel_workers=`SELECT @@global.replica_parallel_workers`
#
# BUG#20236305: MSR: CRASH ON 'START/STOP SLAVE' CMD I.E. ER1794 -> ER1201 -> CRASH
#
# Tests that default channel is created even if creation of
# other channels fails in multisource replication.
# Test that default channel is always created to preserve
# backward compatibility.
--source include/rpl_connection_slave.inc
CALL mtr.add_suppression("Got fatal error .* from source .* replica with the same server_uuid/server_id");
CALL mtr.add_suppression("Error during --relay-log-recovery.*");
CALL mtr.add_suppression("Server was not able to find a rotate event from source server.*");
--source include/stop_slave.inc
# On the slave
RESET SLAVE ALL;
# create a new channel
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT FOR CHANNEL 'ch1'
--enable_warnings
--echo #
--echo # RESTART SLAVE SERVER
--echo #
--let $rpl_server_number= 2
--let $rpl_server_parameters= --relay-log-recovery --skip-replica-start --replica-parallel-workers=4 --relay-log-purge=0
--source include/rpl_restart_server.inc
# This command earlier failed with error ER_CONNECTION_METADATA and the server would
# crash when start slave was issued in the later stages.
#
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT FOR CHANNEL 'ch1'
--enable_warnings
--source include/start_slave.inc
# Stop the slave to execute RESET SLAVE ALL in next step.
--source include/stop_slave.inc
# Lets clear the offending channel and recreate it.
RESET SLAVE ALL FOR CHANNEL 'ch1';
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT FOR CHANNEL 'ch1'
--enable_warnings
# Lets configure the default channel as well.
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT FOR CHANNEL ''
--enable_warnings
# Lets start the slave (and as such, assert that the
# START SLAVE command is not failing any more).
#
# (There are two channels connected to the same server
# though, which may render the slave unable to connect,
# thence not using --source include/start_slave.inc )
START SLAVE;
# clean up
--let $slave_io_errno= convert_error(ER_SERVER_SOURCE_FATAL_ERROR_READING_BINLOG)
--source include/stop_slave.inc
RESET SLAVE ALL;
--replace_result $save_replica_parallel_workers SAVE_PARALLEL_WORKERS
--eval SET @@global.replica_parallel_workers=$save_replica_parallel_workers
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT
--enable_warnings
--source include/start_slave.inc
--let $rpl_server_number= 2
--let $rpl_server_parameters=
--source include/rpl_restart_server.inc
--source include/rpl_connection_master.inc
#
# BUG#20191813: MSR + MTS: IF WE HAVE ANY INACTIVE CHANNEL, POST RESTART START SLAVE HITS ER1794
#
#
# Added test case of BUG#20191813 for sanity check
#
# Test validates that even if the default IO channel
# is not initialized, the existing channel will be
# able to start and not throw an error.
#
--source include/rpl_connection_slave.inc
call mtr.add_suppression("Replica: Failed to initialize the connection metadata structure for channel");
call mtr.add_suppression("The replica coordinator and worker threads are stopped");
call mtr.add_suppression("Recovery from source pos");
call mtr.add_suppression("It is not possible to change the type of the relay log repository because there are workers repositories with possible");
--source include/stop_slave.inc
RESET SLAVE ALL;
SET @@global.replica_parallel_workers=5;
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='localhost', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT FOR CHANNEL 'ch_trunk'
--enable_warnings
# make sure that the IO thread related part for the
# existing channel is indeed started (on slow systems
# START SLAVE is asynchronous and thus the server
# could shutdown without having the structures initialized).
--source include/start_slave.inc
--echo === RESTART SLAVE SERVER ===
--let $rpl_server_number= 2
--let $rpl_server_parameters= --relay-log-recovery --skip-replica-start --replica-parallel-workers=5
--source include/rpl_restart_server.inc
--source include/rpl_connection_slave.inc
START SLAVE;
# clean up
--source include/stop_slave.inc
RESET SLAVE ALL;
--replace_result $save_replica_parallel_workers SAVE_PARALLEL_WORKERS
--eval SET @@global.replica_parallel_workers=$save_replica_parallel_workers
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_MYPORT
--eval CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_PORT=$MASTER_MYPORT
--enable_warnings
--source include/start_slave.inc
--let $rpl_server_number= 2
--let $rpl_server_parameters=
--source include/rpl_restart_server.inc
--source include/start_slave.inc
--source include/rpl_connection_master.inc
--source include/rpl_end.inc
|