2007-06-07 19:18:01 +02:00
|
|
|
-- source include/have_log_bin.inc
|
2006-01-18 00:45:23 +01:00
|
|
|
#####################
|
|
|
|
# Change Author: JBM
|
|
|
|
# Change Date: 2006-01-17
|
|
|
|
# Change: added order by in select
|
|
|
|
#####################
|
|
|
|
|
2004-07-15 04:19:07 +03:00
|
|
|
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
|
2006-12-19 15:10:15 +01:00
|
|
|
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
|
2000-12-13 09:58:26 -07:00
|
|
|
connection master;
|
|
|
|
reset master;
|
2008-01-14 15:38:02 +08:00
|
|
|
source include/show_master_status.inc;
|
2001-01-22 12:35:16 -07:00
|
|
|
save_master_pos;
|
2000-12-13 09:58:26 -07:00
|
|
|
connection slave;
|
|
|
|
reset slave;
|
2008-01-14 15:38:02 +08:00
|
|
|
source include/show_slave_status2.inc;
|
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
|
2008-01-14 15:38:02 +08:00
|
|
|
source include/show_slave_status2.inc;
|
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;
|
2008-01-14 15:38:02 +08:00
|
|
|
source include/show_slave_status2.inc;
|
2002-10-24 17:46:14 -06:00
|
|
|
start slave;
|
2001-01-22 12:35:16 -07:00
|
|
|
sync_with_master;
|
2008-01-14 15:38:02 +08:00
|
|
|
source include/show_slave_status2.inc;
|
2000-12-13 09:58:26 -07:00
|
|
|
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
|
2005-12-22 06:39:02 +01:00
|
|
|
create table t1 (n int, PRIMARY KEY(n));
|
2001-04-18 04:23:14 +03:00
|
|
|
insert into t1 values (10),(45),(90);
|
2002-10-24 17:46:14 -06:00
|
|
|
sync_slave_with_master;
|
2005-12-22 06:39:02 +01:00
|
|
|
connection slave;
|
2006-01-18 00:45:23 +01:00
|
|
|
SELECT * FROM t1 ORDER BY n;
|
2001-01-03 02:15:48 +02:00
|
|
|
connection master;
|
2006-01-18 00:45:23 +01:00
|
|
|
SELECT * FROM t1 ORDER BY n;
|
2001-04-18 04:23:14 +03:00
|
|
|
drop table t1;
|
2002-10-24 17:46:14 -06:00
|
|
|
sync_slave_with_master;
|