summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2010-01-27 19:27:49 +0200
committerAndrei Elkin <aelkin@mysql.com>2010-01-27 19:27:49 +0200
commita589499986dd94d7801cd28433f68ff508c17a26 (patch)
tree65eb5a08b21c7ebe7a58bf87864199af9ef3cdbf /mysql-test
parent7920e89a47a6cc8f65783528291ce87ba5b19074 (diff)
parent29cd733fce232d84758b262121a5dd9b9c0031a6 (diff)
downloadmariadb-git-a589499986dd94d7801cd28433f68ff508c17a26.tar.gz
bug#47142
merging patches prepared for 5.0 to 5.1-bt. That caused a few changes in the test file
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/std_data/bug47142_master-bin.000001bin0 -> 386 bytes
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_until.result20
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_until.test35
3 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/std_data/bug47142_master-bin.000001 b/mysql-test/std_data/bug47142_master-bin.000001
new file mode 100644
index 00000000000..d1a089a784a
--- /dev/null
+++ b/mysql-test/std_data/bug47142_master-bin.000001
Binary files differ
diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result
index 8cf700ecebe..644baba0335 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result
@@ -240,3 +240,23 @@ one
1
drop table t1;
start slave;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+drop table if exists t1;
+Warnings:
+Note 1051 Unknown table 't1'
+flush logs;
+stop slave;
+reset slave;
+start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */;
+show tables /* t1 must exist */;
+Tables_in_test
+t1
+drop table t1;
+stop slave;
+reset slave;
+reset master;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test
index d78f8380961..ae03ebe8b76 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_until.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_until.test
@@ -161,4 +161,39 @@ connection slave;
start slave;
sync_with_master;
+ # Bug #47142 "slave start until" stops 1 event too late in 4.1 to 5.0 replication
+#
+# testing fixes that refine the start position of prior-5.0 master's event
+# and by that provide correct execution of
+# START SLAVE UNTIL ... master_log_pos= x;
+# Keep the test at the end of the file because it manipulates with binlog files
+# to substitute the genuine one with a prepared on 4.1 server.
+#
+
+--source include/master-slave-reset.inc
+
+connection master;
+drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001
+flush logs;
+let $MYSQLD_DATADIR= `select @@datadir`;
+--remove_file $MYSQLD_DATADIR/master-bin.000001
+--copy_file $MYSQL_TEST_DIR/std_data/bug47142_master-bin.000001 $MYSQLD_DATADIR/master-bin.000001
+
+connection slave;
+stop slave;
+reset slave;
+start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */;
+--source include/wait_for_slave_sql_to_stop.inc
+
+show tables /* t1 must exist */;
+
+# clean-up of Bug #47142 testing
+
+drop table t1; # drop on slave only, master does not have t1.
+stop slave;
+reset slave;
+
+connection master;
+reset master;
+
# End of tests