mirror of
https://github.com/MariaDB/server.git
synced 2025-08-29 00:08:14 +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.
52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
# Bug#12691: Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER
|
|
# Date: 01/31/2008
|
|
# Added: Serge Kozlov <skozlov@mysql.com>
|
|
|
|
--source include/master-slave.inc
|
|
--connection master
|
|
--source include/have_binlog_format_mixed_or_statement.inc
|
|
|
|
--echo
|
|
--echo **** On Master ****
|
|
CREATE TABLE t1 (b CHAR(10));
|
|
--echo
|
|
--echo **** On Slave ****
|
|
--sync_slave_with_master
|
|
STOP SLAVE;
|
|
--source include/wait_for_slave_to_stop.inc
|
|
|
|
--connection master
|
|
|
|
--echo
|
|
--echo **** On Master ****
|
|
--exec cp $MYSQL_TEST_DIR/suite/bugs/data/rpl_bug12691.dat $MYSQLTEST_VARDIR/tmp/
|
|
--echo LOAD DATA INFILE FILENAME
|
|
--disable_query_log
|
|
--eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat' INTO TABLE t1 FIELDS TERMINATED BY '|'
|
|
--enable_query_log
|
|
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_bug12691.dat
|
|
|
|
SELECT COUNT(*) FROM t1;
|
|
|
|
source include/show_binlog_events.inc;
|
|
|
|
--save_master_pos
|
|
|
|
--connection slave
|
|
--echo
|
|
--echo **** On Slave ****
|
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
|
START SLAVE;
|
|
--source include/wait_for_slave_to_start.inc
|
|
--sync_with_master
|
|
|
|
SELECT COUNT(*) FROM t1;
|
|
|
|
# Clean up
|
|
--connection master
|
|
--echo
|
|
--echo **** On Master ****
|
|
DROP TABLE t1;
|
|
--sync_slave_with_master
|
|
|