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_single_primary_ro.test

################################################################################
# WL#9426: Single Primary Mode in Group Replication
#
# Validate that the leader will switch the RO mode off when
# becoming a primary.
#
# This is a simple test that sets super read only before we
# start the group and thus before the server becomes PRIMARY.
# Once it becomes primary, it will automatically switch
# super read only off.
################################################################################

--source ../inc/have_group_replication_plugin.inc

--let $rpl_skip_group_replication_start= 1
--let $rpl_group_replication_single_primary_mode=1
--source ../inc/group_replication.inc

--let $rpl_connection_name= server1
--source include/rpl_connection.inc

--let $saved_super_read_only= `SELECT @@GLOBAL.super_read_only`
--let $saved_read_only= `SELECT @@GLOBAL.read_only`
--let $primary_server_uuid= `SELECT @@server_uuid`

# set RO to true
SET GLOBAL super_read_only= TRUE;

--let $assert_cond= "[SELECT @@GLOBAL.super_read_only]" = 1
--let $assert_text= Assert that server is running in super RO.
--source include/assert.inc

# lets start the group
--source ../inc/start_and_bootstrap_group_replication.inc

# wait to be primary
--let $group_replication_expected_uuid=$primary_server_uuid
--source ../inc/gr_wait_primary_member_uuid.inc

# assert that the primary will switch to RW mode.
--let $assert_cond= "[SELECT @@GLOBAL.super_read_only]" = 0
--let $assert_text= Assert that PRIMARY switches out of super RO.
--source include/assert.inc

--source include/stop_group_replication.inc

--replace_result $saved_super_read_only SAVED_SUPER_READ_ONLY
--eval SET GLOBAL super_read_only= $saved_super_read_only
--replace_result $saved_read_only SAVED_READ_ONLY
--eval SET GLOBAL read_only= $saved_read_only

--source ../inc/group_replication_end.inc

Man Man