summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
diff options
context:
space:
mode:
authorunknown <svoj@june.mysql.com>2008-02-27 17:43:54 +0400
committerunknown <svoj@june.mysql.com>2008-02-27 17:43:54 +0400
commiteec647badb68d4f5a2a73471de6ffbdbfb13b0b8 (patch)
tree94cb9c07cb150f99e92b78746f0cb3bde74d6264 /mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
parent2583c281b67ae8cf470266c7438a5852a1bd2265 (diff)
parent432bc1f2599c4408dee991ba4bafc0f622a11077 (diff)
downloadmariadb-git-eec647badb68d4f5a2a73471de6ffbdbfb13b0b8.tar.gz
Merge mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/BUG13861/mysql-5.1-engines mysql-test/suite/rpl/r/rpl_dual_pos_advance.result: Auto merged sql/log_event.cc: Auto merged sql/slave.h: Use local. mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Manual merge. sql/slave.cc: Manual merge.
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_dual_pos_advance.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_dual_pos_advance.test56
1 files changed, 38 insertions, 18 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
index 83c15d691be..26e477786e1 100644
--- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
+++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test
@@ -7,6 +7,7 @@
# It also will test BUG#13861.
source include/master-slave.inc;
+source include/have_innodb.inc;
# set up "dual head"
@@ -30,45 +31,64 @@ save_master_pos;
connection master;
sync_with_master;
-# Now test BUG#13861. This will be enabled when Guilhem fixes this
-# bug.
+#
+# BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
+# log-slave-updates and circul repl
+#
+stop slave;
-# stop slave
+create table t2 (n int); # create one ignored event
-# create table t2 (n int); # create one ignored event
+save_master_pos;
+connection slave;
+sync_with_master;
-# save_master_pos;
-# connection slave;
-# sync_with_master;
+connection slave;
-# connection slave;
+show tables;
-# show tables;
+save_master_pos;
-# save_master_pos;
+create table t3 (n int) engine=innodb;
+set @a=1;
+insert into t3 values(@a);
+begin;
+insert into t3 values(2);
+insert into t3 values(3);
+commit;
+insert into t3 values(4);
-# create table t3 (n int);
-# connection master;
+connection master;
# bug is that START SLAVE UNTIL may stop too late, we test that by
# asking it to stop before creation of t3.
-# start slave until master_log_file="slave-bin.000001",master_log_pos=195;
+start slave until master_log_file="slave-bin.000001",master_log_pos=195;
# wait until it's started (the position below is the start of "CREATE
# TABLE t2") (otherwise wait_for_slave_to_stop may return at once)
-# select master_pos_wait("slave-bin.000001",137);
+select master_pos_wait("slave-bin.000001",137);
-# --source include/wait_for_slave_to_stop.inc
+--source include/wait_for_slave_to_stop.inc
# then BUG#13861 causes t3 to show up below (because stopped too
# late).
-# show tables;
+show tables;
+
+# ensure that we do not break set @a=1; insert into t3 values(@a);
+start slave until master_log_file="slave-bin.000001",master_log_pos=438;
+--source include/wait_for_slave_to_stop.inc
+select * from t3;
+
+# ensure that we do not break transaction
+start slave until master_log_file="slave-bin.000001",master_log_pos=663;
+--source include/wait_for_slave_to_stop.inc
+select * from t3;
-# start slave;
+start slave;
# BUG#13023 is that Exec_master_log_pos may stay too low "forever":
@@ -99,7 +119,7 @@ show tables;
stop slave;
reset slave;
-drop table t1,t4,t5,t6; # add t2 and t3 later
+drop table t1,t2,t3,t4,t5,t6;
save_master_pos;
connection slave;