mirror of
https://github.com/MariaDB/server.git
synced 2025-10-28 17:15:19 +03:00
Some of the test cases reference to binlog position and these position numbers are written into result explicitly. It is difficult to maintain if log event format changes. There are a couple of cases explicit position number appears, we handle them in different ways A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options Use --replace_result to mask them. B. 'SHOW BINLOG EVENT ...' Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. show_binlog_events.inc file's function is enhanced by given $binlog_file and $binlog_limit. C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc' For the test cases just care a few items in the result of 'SHOW SLAVE STATUS', only the items related to each test case are showed. 'show_slave_status.inc' is rebuild, only the given items in $status_items will be showed. 'check_slave_is_running.inc' and 'check_slave_no_error.inc' and 'check_slave_param.inc' are auxiliary files helping to show running status and error information easily.
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
# Testing if "flush logs" command bouncing resulting in logs created in a loop
|
|
# in case of bi-directional replication
|
|
-- source include/master-slave.inc
|
|
|
|
#
|
|
# Start replication master -> slave
|
|
#
|
|
connection slave;
|
|
--disable_warnings
|
|
stop slave;
|
|
--enable_warnings
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
eval change master to master_host='127.0.0.1',master_user='root',
|
|
master_password='',master_port=$MASTER_MYPORT;
|
|
start slave;
|
|
|
|
#
|
|
# Start replication slave -> master
|
|
#
|
|
connection master;
|
|
--disable_warnings
|
|
stop slave;
|
|
--enable_warnings
|
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
|
eval change master to master_host='127.0.0.1',master_user='root',
|
|
master_password='',master_port=$SLAVE_MYPORT;
|
|
start slave;
|
|
|
|
#
|
|
# Wait for start of slave IO and SQL threads
|
|
#
|
|
let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%';
|
|
-- source $MYSQL_TEST_DIR/suite/engines/funcs/t/wait_slave_status.inc
|
|
|
|
#
|
|
# Flush logs of slave
|
|
#
|
|
flush logs;
|
|
sleep 5;
|
|
|
|
#
|
|
# Show status of slave
|
|
#
|
|
--let status_items= Relay_Log_File
|
|
--source include/show_slave_status.inc
|
|
--source include/check_slave_is_running.inc
|
|
STOP SLAVE;
|