mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
757a6b4357
Fixed MDEV-4033 Unable to use slave's temporary directory /tmp - Can't create/write to file '/tmp/SQL_LOAD-' (Errcode: 17 "File exists") - Cache value of check_temp_dir() to avoid race condition - Set $rpl_server_count to avoid error in show_rpl_debug_info.inc mysql-test/suite/multi_source/info_logs.test: Set $rpl_server_count mysql-test/suite/multi_source/multisource.test: Set $rpl_server_count mysql-test/suite/multi_source/relaylog_events.test: Set $rpl_server_count mysql-test/suite/multi_source/reset_slave.test: Set $rpl_server_count mysql-test/suite/multi_source/simple.test: Set $rpl_server_count mysql-test/suite/multi_source/skip_counter.test: Set $rpl_server_count mysql-test/suite/multi_source/status_vars.test: Set $rpl_server_count sql/slave.cc: Cache value of check_temp_dir() to avoid race condition
74 lines
2 KiB
Text
74 lines
2 KiB
Text
#
|
|
# Simple multi-master test
|
|
#
|
|
|
|
--source include/not_embedded.inc
|
|
--let $rpl_server_count= 0
|
|
|
|
--connect (slave,127.0.0.1,root,,,$SERVER_MYPORT_3)
|
|
--connect (master1,127.0.0.1,root,,,$SERVER_MYPORT_1)
|
|
--connect (master2,127.0.0.1,root,,,$SERVER_MYPORT_2)
|
|
--connection slave
|
|
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1
|
|
eval change master 'slave1' to master_port=$SERVER_MYPORT_1, master_host='127.0.0.1', master_user='root';
|
|
--replace_result $SERVER_MYPORT_2 MYPORT_2
|
|
eval change master 'slave2' to master_port=$SERVER_MYPORT_2, master_host='127.0.0.1', master_user='root';
|
|
start slave 'slave1';
|
|
set default_master_connection = 'slave1';
|
|
--source include/wait_for_slave_to_start.inc
|
|
set default_master_connection = 'slave2';
|
|
start all slaves;
|
|
|
|
--source include/wait_for_slave_to_start.inc
|
|
set default_master_connection = '';
|
|
|
|
# Ensure that all data is in the relay log
|
|
--connection master1
|
|
--save_master_pos
|
|
--connection slave
|
|
--sync_with_master 0,'slave1'
|
|
--connection master2
|
|
--save_master_pos
|
|
--connection slave
|
|
--sync_with_master 0,'slave2'
|
|
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
|
show all slaves status;
|
|
|
|
# Ensure that start all slaves doesn't do anything as all slaves are started
|
|
start all slaves;
|
|
|
|
stop slave 'slave1';
|
|
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
|
query_vertical show slave 'slave1' status;
|
|
|
|
reset slave 'slave1';
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
|
show all slaves status;
|
|
|
|
reset slave 'slave1' all;
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
|
show all slaves status;
|
|
|
|
stop all slaves;
|
|
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
|
|
show all slaves status;
|
|
|
|
# Ensure that start all slaves doesn't do anything as all slaves are stopped
|
|
stop all slaves;
|
|
|
|
#
|
|
# clean up
|
|
#
|
|
|
|
--source reset_master_slave.inc
|
|
--disconnect slave
|
|
--connection master1
|
|
--source reset_master_slave.inc
|
|
--disconnect master1
|
|
--connection master2
|
|
--source reset_master_slave.inc
|
|
--disconnect master2
|
|
|