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 |
Current File : //usr/opt/mysql57/mysql-test/suite/group_replication/t/gr_member_host_port.test |
################################################################################ # Verify performance_schema.replication_group_members.MEMBER_HOST # and MEMBER_PORT are set correctly # # Test: # 0. The test requires one server. # 1. Verify that when startup options report-host is not set, its value shown # on MEMBER_PORT value is as defined on rpl_1slave_base.cnf # 2. Verify that when startup options report-port is not set, the MEMBER_PORT # set equal to system variable port. # 3. Verify that when startup options report-host and report-port are set, # performance_schema.replication_group_members.MEMBER_HOST and MEMBER_PORT # set equal to report-host and report-port. # 4. Clean up. ################################################################################ --let $group_replication_group_name= `SELECT UUID()` --source ../inc/have_group_replication_plugin.inc --source include/force_restart.inc --connection server1 --source ../inc/start_and_bootstrap_group_replication.inc --echo ##################################################################### --echo # 1.a Verify that when startup options report-host is not set, its value --echo # shown on MEMBER_PORT value is as defined on rpl_1slave_base.cnf --let $assert_text= The performance_schema.replication_group_members.MEMBER_HOST matches with hostname system variable --let $assert_cond= "[SELECT MEMBER_HOST FROM performance_schema.replication_group_members]" = "127.0.0.1"; --source include/assert.inc --echo ##################################################################### --echo # 1.b Verify that when startup options report-port is not set, --echo # the MEMBER_PORT is set equal to system variable port. --let $assert_text= The performance_schema.replication_group_members.MEMBER_PORT matches with port system variable --let $assert_cond= "[SELECT MEMBER_PORT FROM performance_schema.replication_group_members]" = "[SELECT @@port]"; --source include/assert.inc --echo ##################################################################### --echo # 2. Verify that when startup options report-host and report-port are --echo # set, performance_schema.replication_group_members.MEMBER_HOST and --echo # MEMBER_PORT are set equal to report-host and report-port. --let $new_host= server1-test-host --let $new_port= 1999 # restart server with report-host and report-port parameters --let $allow_rpl_inited=1 --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address` --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds` --let $_group_replication_group_whitelist= `SELECT @@GLOBAL.group_replication_ip_whitelist` --let $restart_parameters=restart:--report-host=$new_host --report-port=$new_port --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_ip_whitelist=$_group_replication_group_whitelist --replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST --source include/restart_mysqld.inc # renable connection --let $rpl_connection_name= server1 --source include/rpl_connection.inc --enable_reconnect --source ../inc/start_and_bootstrap_group_replication.inc --let $assert_text= The performance_schema.replication_group_members.MEMBER_HOST matches with report-host startup option --let $assert_cond= "[SELECT MEMBER_HOST FROM performance_schema.replication_group_members]" = "$new_host"; --source include/assert.inc --let $assert_text= The performance_schema.replication_group_members.MEMBER_PORT matches with report-port startup option --let $assert_cond= "[SELECT MEMBER_PORT FROM performance_schema.replication_group_members]" = "$new_port"; --source include/assert.inc --source include/stop_group_replication.inc # clean up --let $restart_parameters=