mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
It's a regression issue. The reason of the bug appeared to be an error introduced into 5.1 source code. A piece of code in Create_file_log_event::do_apply_event() did not have test coverage which made make test and pb unaware. Fixed with inverting the old value of the return value from Create_file_log_event::do_apply_event(). The rpl test suite is extended with `rpl_cross_version' the file to hold regression cases similar to the current.
This commit is contained in:
36
mysql-test/suite/rpl/t/rpl_cross_version.test
Normal file
36
mysql-test/suite/rpl/t/rpl_cross_version.test
Normal file
@@ -0,0 +1,36 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Verify cross-version replication from an old master to the up-to-date slave
|
||||
#
|
||||
# ==== Implementation ====
|
||||
#
|
||||
# Feed to the slave server a binlog recorded on an old version master
|
||||
# via setting up slave-to-slave replication. The latter is done by means of
|
||||
# the opt file and include/setup_fake_relay_log.inc.
|
||||
# The master's binlog is treated as a relay log that the SQL thread executes.
|
||||
#
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
#
|
||||
# Bug#31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
|
||||
#
|
||||
|
||||
--echo ==== Initialize ====
|
||||
# the relay log contains create t1, t3 tables and load data infile
|
||||
--let $fake_relay_log = $MYSQL_TEST_DIR/suite/binlog/std_data/binlog_old_version_4_1.000001
|
||||
--source include/setup_fake_relay_log.inc
|
||||
|
||||
--echo ==== Test ====
|
||||
start slave sql_thread;
|
||||
--let $slave_param = Exec_Master_Log_Pos
|
||||
# end_log_pos of the last event of the relay log
|
||||
--let $slave_param_value = 149436
|
||||
--source include/wait_for_slave_param.inc
|
||||
--echo ==== a prove that the $fake_relay_log has been processed successfully ====
|
||||
SELECT COUNT(*) - 17920 as zero FROM t3;
|
||||
|
||||
--echo ==== Clean up ====
|
||||
stop slave sql_thread;
|
||||
--source include/cleanup_fake_relay_log.inc
|
||||
drop table t1, t3;
|
Reference in New Issue
Block a user