config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/group_replication/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/opt/mysql57/mysql-test/suite/group_replication/t/gr_start_stop_stress.test

################################################################################
# This test intends to stress Group Replication startup
# by starting and stopping without waiting for the member to come online
# as it is done classically in all other tests.
#
# Test:
# 0. The test requires three servers: M1, M2 and M3.
# 1. Bootstrap start a group on M1. Start GR on M2.
# 2. Create some transactions to ensure that recovery works fine.
# 3. Wait for all servers to be in sync.
# 4. Stress M3 by joining, leaving and joining again without waiting.
# 5. Start and assert check that M3 has recovered properly. Validate value of
#    gtid_executed and data in the table.
# 6. Clean up.
################################################################################
--source include/big_test.inc
--source include/not_valgrind.inc
--let $group_replication_group_name= 57006580-b202-11e4-ab27-0800200c9a66
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--let $rpl_server_count= 3

--let $rpl_gtid_utils= 1
--source ../inc/group_replication.inc

--echo #
--echo # Setup a new group
--echo #

--connection server1
--echo server1
--source ../inc/start_and_bootstrap_group_replication.inc

--connection server2
--echo server2
--source include/start_group_replication.inc

--echo #
--echo # Create some transactions here to ensure that Recovery works fine in
--echo # the end
--echo #

CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;

INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);

--echo #
--echo # Wait for all servers to be in sync
--echo #
--source include/rpl_sync.inc

--connection server3
--echo server3

--echo #
--echo # Stress server 3 by joining, leaving and joining again without waiting
--echo #

--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"

--let $number_of_reps= 5

while($number_of_reps > 0) {
  start group_replication;
  stop group_replication;

  --dec $number_of_reps
}

--echo #
--echo # Start and assert that server 3 has recovered properly
--echo #

--source include/start_group_replication.inc

--let $assert_text= GTID_EXECUTED must contain all group transactions
--let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED, "$group_replication_group_name:1-12")
--source include/assert.inc

--echo #
--echo # Check that values are present
--echo #
SELECT * FROM t1;

--echo #
--echo # Cleanup and exit
--echo #

--connection server1
--echo server1

DROP TABLE t1;

--source ../inc/group_replication_end.inc

Man Man