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_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