2003-01-28 08:38:28 +02:00
|
|
|
connect (master,localhost,root,,test,$MASTER_MYPORT,master.sock);
|
|
|
|
connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
|
2000-12-13 09:58:26 -07:00
|
|
|
connection master;
|
|
|
|
reset master;
|
|
|
|
show master status;
|
2001-01-22 12:35:16 -07:00
|
|
|
save_master_pos;
|
2000-12-13 09:58:26 -07:00
|
|
|
connection slave;
|
|
|
|
reset slave;
|
2001-12-15 04:41:20 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-13 09:58:26 -07:00
|
|
|
show slave status;
|
2002-03-15 18:44:44 -07:00
|
|
|
|
2000-12-13 09:58:26 -07:00
|
|
|
change master to master_host='127.0.0.1';
|
2001-12-15 04:41:20 +02:00
|
|
|
# The following needs to be cleaned up when change master is fixed
|
2004-06-11 18:26:13 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT $MYSQL_TCP_PORT MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-13 09:58:26 -07:00
|
|
|
show slave status;
|
2001-12-15 04:41:20 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2001-04-17 23:06:00 -06:00
|
|
|
eval change master to master_host='127.0.0.1',master_user='root',
|
|
|
|
master_password='',master_port=$MASTER_MYPORT;
|
2001-12-15 04:41:20 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-13 09:58:26 -07:00
|
|
|
show slave status;
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2001-01-22 12:35:16 -07:00
|
|
|
sync_with_master;
|
2001-12-15 04:41:20 +02:00
|
|
|
--replace_result $MASTER_MYPORT MASTER_PORT
|
2003-10-09 18:16:15 +02:00
|
|
|
--replace_column 1 # 33 #
|
2000-12-13 09:58:26 -07:00
|
|
|
show slave status;
|
|
|
|
connection master;
|
2003-01-06 01:48:59 +02:00
|
|
|
--disable_warnings
|
2001-04-18 04:23:14 +03:00
|
|
|
drop table if exists t1;
|
2003-01-06 01:48:59 +02:00
|
|
|
--enable_warnings
|
2001-04-18 04:23:14 +03:00
|
|
|
create table t1 (n int);
|
|
|
|
insert into t1 values (10),(45),(90);
|
2002-10-24 17:46:14 -06:00
|
|
|
sync_slave_with_master;
|
2001-04-18 04:23:14 +03:00
|
|
|
select * from t1;
|
2001-01-03 02:15:48 +02:00
|
|
|
connection master;
|
2001-04-18 04:23:14 +03:00
|
|
|
drop table t1;
|
2002-10-24 17:46:14 -06:00
|
|
|
sync_slave_with_master;
|
2005-07-28 03:22:47 +03:00
|
|
|
|
|
|
|
# End of 4.1 tests
|