403Webshell
Server IP : 104.21.38.3  /  Your IP : 108.162.226.115
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_single_primary_mixed_configuration.test
############################################################
# WL#9426: Single Primary Mode in Group Replication
#
# This test verifies some incompatible configuration modes
# servers join the group. E.g., some have primary mode off
# while the group is operating in single primary mode.
#
############################################################
--source include/big_test.inc
--source ../inc/have_group_replication_plugin.inc
--source include/force_restart.inc

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

--echo
--echo ## START MASTER SERVER 1 (SINGLE PRIMARY)
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 1;
--source ../inc/start_and_bootstrap_group_replication.inc

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 1 - MULTI MASTER + NO ENFORCE CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET SQL_LOG_BIN=0;
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[\\], group configuration option: \\[group_replication_single_primary_mode\\].");
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[group_replication_enforce_update_everywhere_checks\\], group configuration option: \\[group_replication_single_primary_mode\\].");
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[\\], group configuration option: \\[group_replication_enforce_update_everywhere_checks\\].");
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[group_replication_single_primary_mode\\], group configuration option: \\[group_replication_enforce_update_everywhere_checks\\].");
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[group_replication_enforce_update_everywhere_checks\\], group configuration option: \\[\\].");
call mtr.add_suppression("The member configuration is not compatible with the group configuration. .* .member configuration option: \\[group_replication_single_primary_mode\\], group configuration option: \\[\\].");
SET SQL_LOG_BIN=1;

SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 0;
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"

--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 2 - MULTI MASTER + ENFORCE CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= 1;
SET GLOBAL group_replication_single_primary_mode= 0;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## RESTART MASTER SERVER 1 (MULTI MASTER + ENFORCED CHECK)
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET GLOBAL group_replication_single_primary_mode= 0;
SET GLOBAL group_replication_enforce_update_everywhere_checks= 1;
--source ../inc/start_and_bootstrap_group_replication.inc

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 3 - MULTI MASTER + NO ENFORCED CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 0;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 4 - SINGLE MASTER + NO ENFORCED CHECK)
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 1;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## TRY TO START SERVER 2 (VALID CONFIGURATION 5 - MULTI MASTER + ENFORCED CHECK)
SET GLOBAL group_replication_single_primary_mode= 0;
SET GLOBAL group_replication_enforce_update_everywhere_checks= 1;
--source include/start_group_replication.inc
--source include/stop_group_replication.inc

--echo
--echo ## RESTART MASTER SERVER 1 (MULTI MASTER + NO ENFORCED CHECK)
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
SET GLOBAL group_replication_single_primary_mode= 0;
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
--source ../inc/start_and_bootstrap_group_replication.inc

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 6 - SINGLE MASTER + NO ENFORCED CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 1;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## TRY TO START SERVER 2 (INVALID CONFIGURATION 7 - MULTI MASTER + ENFORCE CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_single_primary_mode= 0;
SET GLOBAL group_replication_enforce_update_everywhere_checks= 1;
--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--echo
--echo ## TRY TO START SERVER 2 (VALID CONFIGURATION 8 - MULTI MASTER + NO ENFORCED CHECK)
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET GLOBAL group_replication_enforce_update_everywhere_checks= 0;
SET GLOBAL group_replication_single_primary_mode= 0;
--source include/start_group_replication.inc


--let $server_num= 2

while($server_num>0)
{
  --let $rpl_connection_name= server$server_num
  --source include/rpl_connection.inc
  --source include/stop_group_replication.inc

  --dec $server_num
}

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit