summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_dual_pos_advance.result
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-10-12 13:29:55 +0200
committerunknown <guilhem@mysql.com>2005-10-12 13:29:55 +0200
commitd536481f2ae691df53469102a344db7ca169f32e (patch)
tree3a9668cc5d377733fb17fc9db602a2c9c4b43e74 /mysql-test/r/rpl_dual_pos_advance.result
parent3914952fe7c6eea4368f4c9535c075b15254d4c2 (diff)
downloadmariadb-git-d536481f2ae691df53469102a344db7ca169f32e.tar.gz
Fix for BUG#13023: "SQL Thread is up but doesn't move forward". Details in slave.cc;
in short we now record whenever the slave I/O thread ignores a master's event because of its server id, and use this info in the slave SQL thread to advance Exec_master_log_pos. Because if we do not, this variable stays at the position of the last executed event, i.e. the last *non-ignored* executed one, which may not be the last of the master's binlog (and so the slave *looks* behind the master though it's data-wise it's not). mysql-test/t/rpl_dual_pos_advance-master.opt: empty; its goal is just to trigger a server restart after running the test, so that the master forgets that it was a slave (otherwise it affects the following tests). sql/log.cc: No more default arguments for Rotate_log_event constructor. MYSQL_LOG::appendv() is now called without mutex. sql/log_event.cc: Moving one Rotate_log_event constructor from log_event.h. Support for on-demand choice of duplicating the string argument of the constructor or not (because there now are needs for both alternatives, see slave.cc). sql/log_event.h: We now have a case where a Rotate_log_event is executed by the slave SQL thread while not being in the relay log, so it needs to pretend its length is 0: a ZERO_LEN flag for that; a flag DUP_NAME (replaces "bool alloced") to be able to choose if we want the constructor to duplicate the string argument or not. sql/slave.cc: A comment for BUG#13861 (to be fixed). llstr() instead of %ld as the number is ulonglong. mi->rli becomes rli in some places. Fix for BUG#13023: - in the slave I/O thread, whenever we ignore an event because of its server id we update a couple of coordinates in memory - in the slave SQL thread, whenever we bump into the end of the latest relay log, we check this couple of coordinates to see if we should advance our Exec_master_log_pos. - when the slave I/O thread terminates it saves these in-memory coordinates into a Rotate event in the relay log, so that they are durable. sql/slave.h: A couple of coordinates in RELAY_LOG_INFO to keep track of the last ignored events received by the slave I/O thread (ignored because of the server id). mysql-test/r/rpl_dual_pos_advance.result: New BitKeeper file ``mysql-test/r/rpl_dual_pos_advance.result'' mysql-test/t/rpl_dual_pos_advance.test: Test for BUG#13023 (with a part, disabled, to test BUG#13861 when I fix it). Before the fix, this test used to hang.
Diffstat (limited to 'mysql-test/r/rpl_dual_pos_advance.result')
-rw-r--r--mysql-test/r/rpl_dual_pos_advance.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_dual_pos_advance.result b/mysql-test/r/rpl_dual_pos_advance.result
new file mode 100644
index 00000000000..257baa81b74
--- /dev/null
+++ b/mysql-test/r/rpl_dual_pos_advance.result
@@ -0,0 +1,22 @@
+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;
+reset master;
+change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root";
+start slave;
+create table t1 (n int);
+create table t4 (n int);
+create table t5 (n int);
+create table t6 (n int);
+show tables;
+Tables_in_test
+t1
+t4
+t5
+t6
+stop slave;
+reset slave;
+drop table t1,t4,t5,t6;