mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
26b526dc60
into gleb.loc:/home/uchum/work/bk/5.1-opt libmysql/libmysql.c: Merge with 5.0-opt. mysql-test/r/insert_select.result: Merge with 5.0-opt. mysql-test/r/mysqlbinlog.result: Merge with 5.0-opt. mysql-test/r/rpl_change_master.result: Merge with 5.0-opt. mysql-test/r/view.result: Merge with 5.0-opt. mysql-test/t/insert_select.test: Merge with 5.0-opt. mysql-test/t/mysqlbinlog.test: Merge with 5.0-opt. mysql-test/t/rpl_change_master.test: Merge with 5.0-opt. mysql-test/t/view.test: Merge with 5.0-opt. sql/item.cc: Merge with 5.0-opt. sql/item.h: Merge with 5.0-opt. sql/log_event.cc: Merge with 5.0-opt. sql/sql_select.cc: Merge with 5.0-opt.
37 lines
1 KiB
Text
37 lines
1 KiB
Text
# Verify that after CHANGE MASTER, replication (I/O thread and SQL
|
|
# thread) restart from where SQL thread left, not from where
|
|
# I/O thread left (some old bug fixed in 4.0.17)
|
|
|
|
source include/master-slave.inc;
|
|
|
|
connection master;
|
|
# Make SQL slave thread advance a bit
|
|
create table t1(n int);
|
|
sync_slave_with_master;
|
|
select * from t1;
|
|
# Now stop it and make I/O slave thread be ahead
|
|
stop slave sql_thread;
|
|
connection master;
|
|
insert into t1 values(1);
|
|
insert into t1 values(2);
|
|
save_master_pos;
|
|
connection slave;
|
|
--real_sleep 3 # wait for I/O thread to have read updates
|
|
stop slave;
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
|
query_vertical SHOW SLAVE STATUS;
|
|
change master to master_user='root';
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
|
--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
|
query_vertical SHOW SLAVE STATUS;
|
|
start slave;
|
|
sync_with_master;
|
|
select * from t1;
|
|
connection master;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
# End of 4.1 tests
|