Commit d06b344a authored by unknown's avatar unknown

use $MASTER_PORT

parent cf87803b
......@@ -8,21 +8,21 @@ File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 79 Yes 0 0 1
127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 79 Yes 0 0 1
change master to master_log_pos=73;
slave stop;
change master to master_log_pos=73;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 73 No 0 0 1
127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 73 No 0 0 1
slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 73 Yes 0 0 1
127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 73 Yes 0 0 1
change master to master_log_pos=173;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 1 master-bin.001 173 Yes 0 0 1
127.0.0.1 root $MASTER_MYPORT 1 master-bin.001 173 Yes 0 0 1
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
......
......@@ -9,16 +9,16 @@ Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Rep
change master to master_host='127.0.0.1';
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 test 9998 60 4 No 0 0 0
127.0.0.1 test 3306 60 4 No 0 0 0
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
master_password='',master_port=9306;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 4 No 0 0 0
127.0.0.1 root 9306 60 4 No 0 0 0
slave start;
show slave status;
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Last_log_seq
127.0.0.1 root 9999 60 master-bin.001 79 Yes 0 0 1
127.0.0.1 root 9306 60 master-bin.001 79 Yes 0 0 1
drop table if exists t1;
create table t1 (n int);
insert into t1 values (10),(45),(90);
......
eval_result;
source include/master-slave.inc;
connection master;
show master status;
save_master_pos;
connection slave;
sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
change master to master_log_pos=73;
slave stop;
change master to master_log_pos=73;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
slave start;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
change master to master_log_pos=173;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
connection master;
show master status;
......
......@@ -9,15 +9,12 @@ connection slave;
reset slave;
show slave status;
change master to master_host='127.0.0.1';
--replace_result 3306 9998 9306 9999 3334 9999 3335 9999
show slave status;
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
slave start;
sync_with_master;
--replace_result 9306 9999 3334 9999 3335 9999
show slave status;
connection master;
drop table if exists t1;
......
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