List:Commits« Previous MessageNext Message »
From:Serge Kozlov Date:April 25 2007 8:14am
Subject:bk commit into 5.1 tree (skozlov:1.2482)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ksm. When ksm does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-25 12:14:16+04:00, skozlov@stripped +2 -0
  WL#3754 - circular replication testing

  mysql-test/r/rpl_circular.result@stripped, 2007-04-25 12:14:06+04:00, skozlov@stripped +188 -0
    result file

  mysql-test/r/rpl_circular.result@stripped, 2007-04-25 12:14:06+04:00, skozlov@stripped +0 -0

  mysql-test/t/rpl_circular.test@stripped, 2007-04-25 12:14:08+04:00, skozlov@stripped +214 -0
    test case

  mysql-test/t/rpl_circular.test@stripped, 2007-04-25 12:14:08+04:00, skozlov@stripped +0 -0

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	skozlov
# Host:	virtop.localdomain
# Root:	/home/ksm/commits/mysql-5.1-telco
--- New file ---
+++ mysql-test/r/rpl_circular.result	07/04/25 12:14:06
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT2;
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT;
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT1;
START SLAVE;
START SLAVE;
START SLAVE;
server_a
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
INSERT INTO t1 VALUES (1,1,'');
INSERT INTO t1 VALUES (11,11,UUID());
server_b
INSERT INTO t1 VALUES (2,2,'');
INSERT INTO t1 VALUES (12,12,UUID());
server_c
INSERT INTO t1 VALUES (3,3,'');
INSERT INTO t1 VALUES (13,13,UUID());
server_a
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
STOP SLAVE;
server_a
INSERT INTO t1 VALUES (100,100,'');
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
100	100
server_b
server_c
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
STOP SLAVE;
START SLAVE;
server_a
server_c
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
100	100
server_a
INSERT INTO t1 VALUES (101,101,'');
server_c
INSERT INTO t1 VALUES (103,103,'');
server_a
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
100	100
101	101
103	103
server_b
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
server_c
STOP SLAVE;
server_b
START SLAVE;
server_a
server_c
START SLAVE;
server_b
server_c
server_a
INSERT INTO t1 VALUES(201,201,'');
server_b
INSERT INTO t1 VALUES(202,202,'');
server_c
INSERT INTO t1 VALUES(203,203,'');
server_a
SELECT a,b FROM t1 ORDER BY a;
a	b
1	1
2	2
3	3
11	11
12	12
13	13
100	100
101	101
103	103
201	201
202	202
203	203
server_a
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000001	4	Format_desc	2	106	Server ver: SERVER VERSION
slave-bin.000001	106	Query	2	249	use `test`; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam
slave-bin.000001	249	Query	2	342	use `test`; INSERT INTO t1 VALUES (1,1,'')
slave-bin.000001	342	Table_map	2	383	table_id # (test.t1)
slave-bin.000001	383	Write_rows	2	458	table_id # flags: STMT_END_F
slave-bin.000001	458	Query	3	551	use `test`; INSERT INTO t1 VALUES (2,2,'')
slave-bin.000001	551	Table_map	3	592	table_id # (test.t1)
slave-bin.000001	592	Write_rows	3	667	table_id # flags: STMT_END_F
slave-bin.000001	667	Query	4	760	use `test`; INSERT INTO t1 VALUES (3,3,'')
slave-bin.000001	760	Table_map	4	801	table_id # (test.t1)
slave-bin.000001	801	Write_rows	4	876	table_id # flags: STMT_END_F
slave-bin.000001	876	Query	2	973	use `test`; INSERT INTO t1 VALUES (100,100,'')
slave-bin.000001	973	Query	2	1070	use `test`; INSERT INTO t1 VALUES (101,101,'')
slave-bin.000001	1070	Query	4	1167	use `test`; INSERT INTO t1 VALUES (103,103,'')
slave-bin.000001	1167	Query	2	1263	use `test`; INSERT INTO t1 VALUES(201,201,'')
slave-bin.000001	1263	Query	3	1359	use `test`; INSERT INTO t1 VALUES(202,202,'')
slave-bin.000001	1359	Query	4	1455	use `test`; INSERT INTO t1 VALUES(203,203,'')
server_b
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave1-bin.000001	4	Format_desc	3	106	Server ver: SERVER VERSION
slave1-bin.000001	106	Query	2	249	use `test`; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam
slave1-bin.000001	249	Query	2	342	use `test`; INSERT INTO t1 VALUES (1,1,'')
slave1-bin.000001	342	Table_map	2	383	table_id # (test.t1)
slave1-bin.000001	383	Write_rows	2	458	table_id # flags: STMT_END_F
slave1-bin.000001	458	Query	3	551	use `test`; INSERT INTO t1 VALUES (2,2,'')
slave1-bin.000001	551	Table_map	3	592	table_id # (test.t1)
slave1-bin.000001	592	Write_rows	3	667	table_id # flags: STMT_END_F
slave1-bin.000001	667	Query	4	760	use `test`; INSERT INTO t1 VALUES (3,3,'')
slave1-bin.000001	760	Table_map	4	801	table_id # (test.t1)
slave1-bin.000001	801	Write_rows	4	876	table_id # flags: STMT_END_F
slave1-bin.000001	876	Query	2	973	use `test`; INSERT INTO t1 VALUES (100,100,'')
slave1-bin.000001	973	Query	2	1070	use `test`; INSERT INTO t1 VALUES (101,101,'')
slave1-bin.000001	1070	Query	4	1167	use `test`; INSERT INTO t1 VALUES (103,103,'')
slave1-bin.000001	1167	Query	2	1263	use `test`; INSERT INTO t1 VALUES(201,201,'')
slave1-bin.000001	1263	Query	3	1359	use `test`; INSERT INTO t1 VALUES(202,202,'')
slave1-bin.000001	1359	Query	4	1455	use `test`; INSERT INTO t1 VALUES(203,203,'')
server_c
SHOW BINLOG EVENTS;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave2-bin.000001	4	Format_desc	4	106	Server ver: SERVER VERSION
slave2-bin.000001	106	Query	2	249	use `test`; CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam
slave2-bin.000001	249	Query	2	342	use `test`; INSERT INTO t1 VALUES (1,1,'')
slave2-bin.000001	342	Table_map	2	383	table_id # (test.t1)
slave2-bin.000001	383	Write_rows	2	458	table_id # flags: STMT_END_F
slave2-bin.000001	458	Query	3	551	use `test`; INSERT INTO t1 VALUES (2,2,'')
slave2-bin.000001	551	Table_map	3	592	table_id # (test.t1)
slave2-bin.000001	592	Write_rows	3	667	table_id # flags: STMT_END_F
slave2-bin.000001	667	Query	4	760	use `test`; INSERT INTO t1 VALUES (3,3,'')
slave2-bin.000001	760	Table_map	4	801	table_id # (test.t1)
slave2-bin.000001	801	Write_rows	4	876	table_id # flags: STMT_END_F
slave2-bin.000001	876	Query	2	973	use `test`; INSERT INTO t1 VALUES (100,100,'')
slave2-bin.000001	973	Query	2	1070	use `test`; INSERT INTO t1 VALUES (101,101,'')
slave2-bin.000001	1070	Query	4	1167	use `test`; INSERT INTO t1 VALUES (103,103,'')
slave2-bin.000001	1167	Query	2	1263	use `test`; INSERT INTO t1 VALUES(201,201,'')
slave2-bin.000001	1263	Query	3	1359	use `test`; INSERT INTO t1 VALUES(202,202,'')
slave2-bin.000001	1359	Query	4	1455	use `test`; INSERT INTO t1 VALUES(203,203,'')
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;

--- New file ---
+++ mysql-test/t/rpl_circular.test	07/04/25 12:14:08
#########################################
# Author:  Serge Kozlov skozlov@stripped
# Date:    04/12/2007
# Purpose: Testing circular replication
#          for scheme A->B->C->A and
#          fail-over
#########################################

--source include/have_innodb.inc

# Create connections to three slave servers
connect (server_a,127.0.0.1,root,,test,$SLAVE_MYPORT,);
connect (server_b,127.0.0.1,root,,test,$SLAVE_MYPORT1,);
connect (server_c,127.0.0.1,root,,test,$SLAVE_MYPORT2,);

#
# Create circular replication by scheme
# server_a->server_b->server_c->server_a
#

--disable_warnings

# make server_a as slave for server_c and clean up
--connection server_a
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
--echo CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT2;
--disable_query_log
eval CHANGE MASTER TO MASTER_PORT = $SLAVE_MYPORT2;
--enable_query_log

# make server_b as slave for server_a and clean up
--connection server_b
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
--echo CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT;
--disable_query_log
eval CHANGE MASTER TO MASTER_PORT = $SLAVE_MYPORT;
--enable_query_log

# make server_c as slave for server_b and clean up
--connection server_c
USE test;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
STOP SLAVE;
RESET MASTER;
--echo CHANGE MASTER TO MASTER_PORT = SLAVE_MYPORT1;
--disable_query_log
eval CHANGE MASTER TO MASTER_PORT = $SLAVE_MYPORT1;
--enable_query_log

# start server_a
--connection server_a
START SLAVE;

# start server_b
--connection server_b
START SLAVE;

# start server_c
--connection server_c
START SLAVE;

--enable_warnings

# Circular replication for 3 servers is ready


#
# Simply test for testing of circular replication
#

--connection server_a
--echo server_a
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
# put row on server_a
INSERT INTO t1 VALUES (1,1,'');
INSERT INTO t1 VALUES (11,11,UUID());
--sync_slave_with_master server_b
--echo server_b
# put row on server_b
INSERT INTO t1 VALUES (2,2,'');
INSERT INTO t1 VALUES (12,12,UUID());
--sync_slave_with_master server_c
--echo server_c
# put row on server_c
INSERT INTO t1 VALUES (3,3,'');
INSERT INTO t1 VALUES (13,13,UUID());
--sync_slave_with_master server_a
--echo server_a
# make sure that all rows replicated correctly
SELECT a,b FROM t1 ORDER BY a;

#
# Testing fail-over:
# Stop server_b and make new replication scheme
# server_a->server_c->server_a
#

# stop server_b
--connection server_b
STOP SLAVE;

--connection server_a
--echo server_a
INSERT INTO t1 VALUES (100,100,'');
SELECT a,b FROM t1 ORDER BY a;
--connection server_b
--echo server_b
--sync_slave_with_master server_c
--echo server_c
SELECT a,b FROM t1 ORDER BY a;
STOP SLAVE;
--disable_query_log
eval CHANGE MASTER TO MASTER_PORT = $SLAVE_MYPORT, MASTER_LOG_FILE = 'slave-bin.000001';
--enable_query_log
START SLAVE;
--connection server_a
--echo server_a
--sync_slave_with_master server_c
--echo server_c
SELECT a,b FROM t1 ORDER BY a;

--connection server_a
--echo server_a
INSERT INTO t1 VALUES (101,101,'');
--sync_slave_with_master server_c
# put row on server_c
--echo server_c
INSERT INTO t1 VALUES (103,103,'');
--sync_slave_with_master server_a
# make sure that all rows replicated correctly
--echo server_a
SELECT a,b FROM t1 ORDER BY a;
# but server server_b shouldn't have some rows
--connection server_b
--echo server_b
SELECT a,b FROM t1 ORDER BY a;



#
# Testing fail-over:
# Start server_b and restore replication scheme
# server_a->server_b->server_c->server_a
#

--connection server_a
--sync_slave_with_master server_c
--echo server_c
STOP SLAVE;
--connection server_b
--echo server_b
START SLAVE;
--connection server_a
--echo server_a
--sync_slave_with_master server_b
--connection server_c
--echo server_c
--disable_query_log
eval CHANGE MASTER TO MASTER_PORT = $SLAVE_MYPORT1, MASTER_LOG_FILE = 'slave1-bin.000001';
--enable_query_log
START SLAVE;
--connection server_b
--echo server_b
--sync_slave_with_master server_c
--echo server_c

--connection server_a
--echo server_a
INSERT INTO t1 VALUES(201,201,'');
--sync_slave_with_master server_b
--echo server_b
INSERT INTO t1 VALUES(202,202,'');
--sync_slave_with_master server_c
--echo server_c
INSERT INTO t1 VALUES(203,203,'');
--sync_slave_with_master server_a
--echo server_a
SELECT a,b FROM t1 ORDER BY a;

#
# Check binlog for all servers
#

--connection server_a
--echo server_a
--replace_regex /table_id: [0-9]+/table_id #/ /Server ver:.+/Server ver: SERVER VERSION/
SHOW BINLOG EVENTS;

--connection server_b
--echo server_b
--replace_regex /table_id: [0-9]+/table_id #/ /Server ver:.+/Server ver: SERVER VERSION/
SHOW BINLOG EVENTS;

--connection server_c
--echo server_c
--replace_regex /table_id: [0-9]+/table_id #/ /Server ver:.+/Server ver: SERVER VERSION/
SHOW BINLOG EVENTS;


#
# Clean up
#

--disable_warnings
--connection server_a
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
--enable_warnings


Thread
bk commit into 5.1 tree (skozlov:1.2482)Serge Kozlov25 Apr