1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
unknown
2008-02-27 17:43:54 +04:00
5 changed files with 123 additions and 43 deletions

View File

@ -8,15 +8,56 @@ 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);
stop slave;
create table t2 (n int);
show tables;
Tables_in_test
t1
t2
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);
start slave until master_log_file="slave-bin.000001",master_log_pos=195;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
select master_pos_wait("slave-bin.000001",137);
master_pos_wait("slave-bin.000001",137)
0
show tables;
Tables_in_test
t1
t2
start slave until master_log_file="slave-bin.000001",master_log_pos=438;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
select * from t3;
n
1
start slave until master_log_file="slave-bin.000001",master_log_pos=663;
Warnings:
Note 1278 It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart
select * from t3;
n
1
2
3
start slave;
create table t4 (n int);
create table t5 (n int);
create table t6 (n int);
show tables;
Tables_in_test
t1
t2
t3
t4
t5
t6
stop slave;
reset slave;
drop table t1,t4,t5,t6;
drop table t1,t2,t3,t4,t5,t6;

View File

@ -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;
# start slave;
# 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;
# 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;

View File

@ -0,0 +1 @@
--innodb