Commit 84a237b9 authored by Serge Kozlov's avatar Serge Kozlov

Bug#38603:

The patch adds restart of mysql server and replacing of binlog file 
when mysql server is stopped.
parent d34ae8c7
......@@ -862,6 +862,9 @@ drop table t21,t31;
drop table t11;
STOP SLAVE;
FLUSH LOGS;
--> Stop master server
--> Start master server
--> Master binlog: Server ver: 5.0.16-debug-log, Binlog ver: 4
RESET SLAVE;
START SLAVE;
SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
......
......@@ -46,9 +46,7 @@ insert into t2 values(NULL,0),(500,0);
select a,b, truncate(rand_value,4) from t1;
select * from t2;
select a,name, old_a, old_b, truncate(rand_value,4) from t3;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
--disable_query_log
select "--- On slave --" as "";
--enable_query_log
......@@ -108,9 +106,7 @@ SELECT trigger_name, definer
FROM information_schema.triggers
WHERE trigger_name = 't1_first';
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
--disable_query_log
select "--- On slave --" as "";
--enable_query_log
......@@ -165,9 +161,7 @@ create database other;
use other;
insert into test.t1 values (1);
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
connection master;
use test;
......@@ -304,9 +298,29 @@ STOP SLAVE;
connection master;
let $MYSQLD_DATADIR= `select @@datadir`;
FLUSH LOGS;
# Stop master server
--echo --> Stop master server
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
--shutdown_server 10
--source include/wait_until_disconnected.inc
# Replace binlog
remove_file $MYSQLD_DATADIR/master-bin.000001;
copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001;
--echo --> Start master server
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart
EOF
--enable_reconnect
--source include/wait_until_connected_again.inc
let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1);
# Make the slave to replay the new binlog.
--echo --> Master binlog: $binlog_version
# Make the slave to replay the new binlog.
connection slave;
......@@ -381,9 +395,7 @@ DROP TABLE IF EXISTS t2;
--echo
--echo ---> Synchronizing slave with master...
--save_master_pos
--connection slave
--sync_with_master
--sync_slave_with_master
--echo
--echo ---> connection: master
......@@ -415,9 +427,7 @@ SELECT * FROM t2;
--echo
--echo ---> Synchronizing slave with master...
--save_master_pos
--connection slave
--sync_with_master
--sync_slave_with_master
--echo ---> connection: master
......@@ -439,9 +449,7 @@ SELECT * FROM t2;
DROP TABLE t1;
DROP TABLE t2;
--save_master_pos
--connection slave
--sync_with_master
--sync_slave_with_master
--connection master
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment