summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_charset.test
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-09-23 12:16:56 +0200
committerunknown <guilhem@mysql.com>2004-09-23 12:16:56 +0200
commitb76d3b4f70541e404f0dd4499ba241ece4cdce41 (patch)
tree2f0092ce28cd67173fe36192649ff6bd1c319820 /mysql-test/t/rpl_charset.test
parentccf52b4fd5bd7ae0a418d22f2758cef345b6afa6 (diff)
downloadmariadb-git-b76d3b4f70541e404f0dd4499ba241ece4cdce41.tar.gz
Fix for BUG#5705: "SET CHARATER_SET_SERVERetc will be lost if STOP SLAVE before following query":
we do not increment rli->group_master_log_pos if we are just after a SET ONE_SHOT (it's not a standalone event) mysql-test/r/rpl_charset.result: testing interruption of slave SQL thread between SET CHARACTER_SET_SERVER... and the companion INSERT. mysql-test/t/rpl_charset.test: testing interruption of slave SQL thread between SET CHARACTER_SET_SERVER... and the companion INSERT. sql/log_event.cc: we do not increment rli->group_master_log_pos if we are just after a SET ONE_SHOT, because SET ONE_SHOT should not be separated from its following updating query.
Diffstat (limited to 'mysql-test/t/rpl_charset.test')
-rw-r--r--mysql-test/t/rpl_charset.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_charset.test b/mysql-test/t/rpl_charset.test
index 83e7d95e28c..9b9f53a94de 100644
--- a/mysql-test/t/rpl_charset.test
+++ b/mysql-test/t/rpl_charset.test
@@ -148,6 +148,24 @@ INSERT INTO t1 (c1, c2) VALUES ('Ну, за рыбалку','Ну, за рыбалку');
select hex(c1), hex(c2) from t1;
sync_slave_with_master;
select hex(c1), hex(c2) from t1;
+
+# Now test for BUG##5705: SET CHARATER_SET_SERVERetc will be lost if
+# STOP SLAVE before following query
+
+stop slave;
+delete from t1;
+change master to master_log_pos=5801;
+start slave until master_log_file='master-bin.000001', master_log_pos=5937;
+# Slave is supposed to stop _after_ the INSERT, even though 5937 is
+# the position of the beginning of the INSERT; after SET slave is not
+# supposed to increment position.
+wait_for_slave_to_stop;
+# When you merge this into 5.0 you will have to adjust positions
+# above; the first master_log_pos above should be the one of the SET,
+# the second should be the one of the INSERT.
+start slave;
+sync_with_master;
+select hex(c1), hex(c2) from t1;
connection master;
drop table t1;
sync_slave_with_master;