summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-11-18 17:36:09 +0100
committerunknown <guilhem@mysql.com>2003-11-18 17:36:09 +0100
commit40c951a01e49f39e6782fc09965a88cb3a4755e7 (patch)
tree139c976a00f9f9105d8031722a4f6bb9dba3a6bb /mysql-test/t
parentc072804d51c2941a955747afc0dae802e8843845 (diff)
parent80649ee8746aab02a198285248668cb49ce70f33 (diff)
downloadmariadb-git-40c951a01e49f39e6782fc09965a88cb3a4755e7.tar.gz
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/rpl_change_master.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_change_master.test b/mysql-test/t/rpl_change_master.test
new file mode 100644
index 00000000000..61de22fe57b
--- /dev/null
+++ b/mysql-test/t/rpl_change_master.test
@@ -0,0 +1,26 @@
+source include/master-slave.inc;
+
+connection slave;
+select get_lock("a",5);
+connection master;
+create table t1(n int);
+insert into t1 values(1+get_lock("a",10)*0);
+insert into t1 values(2);
+save_master_pos;
+connection slave;
+sleep 3; # can't sync_with_master as we should be blocked
+stop slave;
+select * from t1;
+show slave status;
+change master to master_user='root';
+show slave status;
+# Will restart from after the values(2), which is bug
+select release_lock("a");
+start slave;
+sync_with_master;
+select * from t1;
+connection master;
+drop table t1;
+save_master_pos;
+connection slave;
+sync_with_master;