1include/group_replication.inc 2Warnings: 3Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. 4Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. 5[connection server1] 6SET @group_replication_flow_control_mode_save= @@GLOBAL.group_replication_flow_control_mode; 7SET @group_replication_flow_control_certifier_threshold_save= @@GLOBAL.group_replication_flow_control_certifier_threshold; 8SET @group_replication_flow_control_applier_threshold_save= @@GLOBAL.group_replication_flow_control_applier_threshold; 9SET @group_replication_flow_control_min_quota_save= @@GLOBAL.group_replication_flow_control_min_quota; 10SET @group_replication_flow_control_min_recovery_quota_save= @@GLOBAL.group_replication_flow_control_min_recovery_quota; 11SET @group_replication_flow_control_max_quota_save= @@GLOBAL.group_replication_flow_control_max_quota; 12SET @group_replication_flow_control_member_quota_percent_save= @@GLOBAL.group_replication_flow_control_member_quota_percent; 13SET @group_replication_flow_control_period_save= @@GLOBAL.group_replication_flow_control_period; 14SET @group_replication_flow_control_hold_percent_save= @@GLOBAL.group_replication_flow_control_hold_percent; 15SET @group_replication_flow_control_release_percent_save= @@GLOBAL.group_replication_flow_control_release_percent; 16SET @debug_saved= @@GLOBAL.DEBUG; 17SET @@GLOBAL.DEBUG= 'd,flow_control_simulate_delayed_members'; 18set session sql_log_bin=0; 19CALL mtr.add_suppression("group_replication_flow_control_min_quota cannot be larger than group_replication_flow_control_max_quota"); 20CALL mtr.add_suppression("group_replication_flow_control_min_recovery_quota cannot be larger than group_replication_flow_control_max_quota"); 21CALL mtr.add_suppression("group_replication_flow_control_max_quota cannot be smaller than group_replication_flow_control_min_quota or group_replication_flow_control_min_recovery_quota"); 22set session sql_log_bin=1; 23 24############################################################ 25# 1. Test group_replication_flow_control_mode option. 26SET GLOBAL group_replication_flow_control_mode= ""; 27ERROR 42000: Variable 'group_replication_flow_control_mode' can't be set to the value of '' 28SET GLOBAL group_replication_flow_control_mode= "XXX"; 29ERROR 42000: Variable 'group_replication_flow_control_mode' can't be set to the value of 'XXX' 30SET GLOBAL group_replication_flow_control_mode= -1; 31ERROR 42000: Variable 'group_replication_flow_control_mode' can't be set to the value of '-1' 32SET GLOBAL group_replication_flow_control_mode= 2; 33ERROR 42000: Variable 'group_replication_flow_control_mode' can't be set to the value of '2' 34SET GLOBAL group_replication_flow_control_mode= DISABLED; 35include/assert.inc [group_replication_flow_control_mode is correct] 36SET GLOBAL group_replication_flow_control_mode= QUOTA; 37include/assert.inc [group_replication_flow_control_mode is correct] 38SET GLOBAL group_replication_flow_control_mode= 0; 39include/assert.inc [group_replication_flow_control_mode is correct] 40SET GLOBAL group_replication_flow_control_mode= 1; 41include/assert.inc [group_replication_flow_control_mode is correct] 42 43############################################################ 44# 2. Test group_replication_flow_control_certifier_threshold 45# option. 46SET GLOBAL group_replication_flow_control_certifier_threshold= ""; 47ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_certifier_threshold' 48SET GLOBAL group_replication_flow_control_certifier_threshold= -1; 49Warnings: 50Warning 1292 Truncated incorrect group_replication_flow_control_certifier_threshold value: '-1' 51include/assert.inc [group_replication_flow_control_certifier_threshold is truncated] 52SET GLOBAL group_replication_flow_control_certifier_threshold= 2147483648; 53Warnings: 54Warning 1292 Truncated incorrect group_replication_flow_control_certifier_threshold value: '2147483648' 55include/assert.inc [group_replication_flow_control_certifier_threshold is truncated] 56SET GLOBAL group_replication_flow_control_certifier_threshold= 1; 57include/assert.inc [group_replication_flow_control_certifier_threshold is correct] 58SET GLOBAL group_replication_flow_control_certifier_threshold= 2147483647; 59include/assert.inc [group_replication_flow_control_certifier_threshold is correct] 60 61############################################################ 62# 3. Test group_replication_flow_control_applier_threshold 63# option. 64SET GLOBAL group_replication_flow_control_applier_threshold= ""; 65ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_applier_threshold' 66SET GLOBAL group_replication_flow_control_applier_threshold= -1; 67Warnings: 68Warning 1292 Truncated incorrect group_replication_flow_control_applier_threshold value: '-1' 69include/assert.inc [group_replication_flow_control_applier_threshold is truncated] 70SET GLOBAL group_replication_flow_control_applier_threshold= 2147483648; 71Warnings: 72Warning 1292 Truncated incorrect group_replication_flow_control_applier_threshold value: '2147483648' 73include/assert.inc [group_replication_flow_control_applier_threshold is truncated] 74SET GLOBAL group_replication_flow_control_applier_threshold= 1; 75include/assert.inc [group_replication_flow_control_applier_threshold is correct] 76SET GLOBAL group_replication_flow_control_applier_threshold= 2147483647; 77include/assert.inc [group_replication_flow_control_applier_threshold is correct] 78 79############################################################ 80# 4. Test group_replication_flow_control_min_quota 81# option. 82SET GLOBAL group_replication_flow_control_min_quota= ""; 83ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_min_quota' 84SET GLOBAL group_replication_flow_control_min_quota= -1; 85include/assert.inc [group_replication_flow_control_min_quota is truncated] 86SET GLOBAL group_replication_flow_control_min_quota= 2147483648; 87include/assert.inc [group_replication_flow_control_min_quota is truncated] 88SET GLOBAL group_replication_flow_control_min_quota= 1; 89include/assert.inc [group_replication_flow_control_min_quota is correct] 90SET GLOBAL group_replication_flow_control_min_quota= 2147483647; 91include/assert.inc [group_replication_flow_control_min_quota is correct] 92SET GLOBAL group_replication_flow_control_min_quota= 0; 93 94############################################################ 95# 5. Test group_replication_flow_control_min_recovery_quota 96# option. 97SET GLOBAL group_replication_flow_control_min_recovery_quota= ""; 98ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_min_recovery_quota' 99SET GLOBAL group_replication_flow_control_min_recovery_quota= -1; 100include/assert.inc [group_replication_flow_control_min_recovery_quota is truncated] 101SET GLOBAL group_replication_flow_control_min_recovery_quota= 2147483648; 102include/assert.inc [group_replication_flow_control_min_recovery_quota is truncated] 103SET GLOBAL group_replication_flow_control_min_recovery_quota= 1; 104include/assert.inc [group_replication_flow_control_min_recovery_quota is correct] 105SET GLOBAL group_replication_flow_control_min_recovery_quota= 2147483647; 106include/assert.inc [group_replication_flow_control_min_recovery_quota is correct] 107SET GLOBAL group_replication_flow_control_min_recovery_quota= 0; 108 109############################################################ 110# 6. Test group_replication_flow_control_max_quota 111# option. 112SET GLOBAL group_replication_flow_control_max_quota= ""; 113ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_max_quota' 114SET GLOBAL group_replication_flow_control_max_quota= -1; 115include/assert.inc [group_replication_flow_control_max_quota is truncated] 116SET GLOBAL group_replication_flow_control_max_quota= 2147483648; 117include/assert.inc [group_replication_flow_control_max_quota is truncated] 118SET GLOBAL group_replication_flow_control_max_quota= 1; 119include/assert.inc [group_replication_flow_control_max_quota is correct] 120SET GLOBAL group_replication_flow_control_max_quota= 2147483647; 121include/assert.inc [group_replication_flow_control_max_quota is correct] 122SET GLOBAL group_replication_flow_control_max_quota= 0; 123 124############################################################ 125# 7. Test group_replication_flow_control_member_quota_percent 126# option. 127SET GLOBAL group_replication_flow_control_member_quota_percent= ""; 128ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_member_quota_percent' 129SET GLOBAL group_replication_flow_control_member_quota_percent= -1; 130Warnings: 131Warning 1292 Truncated incorrect group_replication_flow_control_member_quota_percent value: '-1' 132include/assert.inc [group_replication_flow_control_member_quota_percent is truncated] 133SET GLOBAL group_replication_flow_control_member_quota_percent= 101; 134Warnings: 135Warning 1292 Truncated incorrect group_replication_flow_control_member_quota_percent value: '101' 136include/assert.inc [group_replication_flow_control_member_quota_percent is truncated] 137SET GLOBAL group_replication_flow_control_member_quota_percent= 1; 138include/assert.inc [group_replication_flow_control_member_quota_percent is correct] 139SET GLOBAL group_replication_flow_control_member_quota_percent= 100; 140include/assert.inc [group_replication_flow_control_member_quota_percent is correct] 141 142############################################################ 143# 8. Test group_replication_flow_control_period option. 144SET GLOBAL group_replication_flow_control_period= ""; 145ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_period' 146SET GLOBAL group_replication_flow_control_period= 0; 147Warnings: 148Warning 1292 Truncated incorrect group_replication_flow_control_period value: '0' 149include/assert.inc [group_replication_flow_control_period is truncated] 150SET GLOBAL group_replication_flow_control_period= 61; 151Warnings: 152Warning 1292 Truncated incorrect group_replication_flow_control_period value: '61' 153include/assert.inc [group_replication_flow_control_period is truncated] 154SET GLOBAL group_replication_flow_control_period= 1; 155include/assert.inc [group_replication_flow_control_period is correct] 156SET GLOBAL group_replication_flow_control_period= 60; 157include/assert.inc [group_replication_flow_control_period is correct] 158 159############################################################ 160# 9. Test group_replication_flow_control_hold_percent 161# option. 162 163SET GLOBAL group_replication_flow_control_hold_percent= ""; 164ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_hold_percent' 165SET GLOBAL group_replication_flow_control_hold_percent= -1; 166Warnings: 167Warning 1292 Truncated incorrect group_replication_flow_control_hold_percent value: '-1' 168include/assert.inc [group_replication_flow_control_hold_percent is truncated] 169SET GLOBAL group_replication_flow_control_hold_percent= 101; 170Warnings: 171Warning 1292 Truncated incorrect group_replication_flow_control_hold_percent value: '101' 172include/assert.inc [group_replication_flow_control_hold_percent is truncated] 173SET GLOBAL group_replication_flow_control_hold_percent= 1; 174include/assert.inc [group_replication_flow_control_hold_percent is correct] 175SET GLOBAL group_replication_flow_control_hold_percent= 100; 176include/assert.inc [group_replication_flow_control_hold_percent is correct] 177############################################################ 178# 10. Test group_replication_flow_control_release_percent 179# option. 180SET GLOBAL group_replication_flow_control_release_percent= ""; 181ERROR 42000: Incorrect argument type to variable 'group_replication_flow_control_release_percent' 182SET GLOBAL group_replication_flow_control_release_percent= -1; 183Warnings: 184Warning 1292 Truncated incorrect group_replication_flow_control_release_percent value: '-1' 185include/assert.inc [group_replication_flow_control_release_percent is truncated] 186SET GLOBAL group_replication_flow_control_release_percent= 1001; 187Warnings: 188Warning 1292 Truncated incorrect group_replication_flow_control_release_percent value: '1001' 189include/assert.inc [group_replication_flow_control_release_percent is truncated] 190SET GLOBAL group_replication_flow_control_release_percent= 1; 191include/assert.inc [group_replication_flow_control_release_percent is correct] 192SET GLOBAL group_replication_flow_control_release_percent= 1000; 193include/assert.inc [group_replication_flow_control_release_percent is correct] 194 195############################################################ 196# 11. Test group_replication_flow_control_max_quota 197# option. 198SET GLOBAL group_replication_flow_control_min_recovery_quota= 10; 199SET GLOBAL group_replication_flow_control_min_quota= 10; 200SET GLOBAL group_replication_flow_control_max_quota= 100; 201SET GLOBAL group_replication_flow_control_min_quota= 1000; 202ERROR 42000: group_replication_flow_control_min_quota cannot be larger than group_replication_flow_control_max_quota 203include/assert.inc [group_replication_flow_control_min_quota cannot be larger than max_quota] 204SET GLOBAL group_replication_flow_control_min_recovery_quota= 1000; 205ERROR 42000: group_replication_flow_control_min_recovery_quota cannot be larger than group_replication_flow_control_max_quota 206include/assert.inc [group_replication_flow_control_min_recovery_quota cannot be larger than max_quota] 207SET GLOBAL group_replication_flow_control_max_quota= 1; 208ERROR 42000: group_replication_flow_control_max_quota cannot be smaller than group_replication_flow_control_min_quota or group_replication_flow_control_min_recovery_quota 209include/assert.inc [group_replication_flow_control_max_quota cannot be lower than min_quota or min_recovery_quota] 210SET GLOBAL group_replication_flow_control_min_recovery_quota= 0; 211SET GLOBAL group_replication_flow_control_min_quota= 0; 212SET GLOBAL group_replication_flow_control_max_quota= 0; 213 214############################################################ 215# 12. Change all group_replication_flow_control options while 216# Group Replication is running. 217include/start_and_bootstrap_group_replication.inc 218SET GLOBAL group_replication_flow_control_mode= DISABLED; 219include/assert.inc [group_replication_flow_control_mode is correct] 220SET GLOBAL group_replication_flow_control_mode= QUOTA; 221include/assert.inc [group_replication_flow_control_mode is correct] 222SET GLOBAL group_replication_flow_control_certifier_threshold= 1000; 223include/assert.inc [group_replication_flow_control_certifier_threshold is correct] 224SET GLOBAL group_replication_flow_control_applier_threshold= 1000; 225include/assert.inc [group_replication_flow_control_applier_threshold is correct] 226SET GLOBAL group_replication_flow_control_min_quota= 1000; 227include/assert.inc [group_replication_flow_control_min_quota is correct] 228SET GLOBAL group_replication_flow_control_min_recovery_quota= 1000; 229include/assert.inc [group_replication_flow_control_min_recovery_quota is correct] 230SET GLOBAL group_replication_flow_control_max_quota= 2000; 231include/assert.inc [group_replication_flow_control_max_quota is correct] 232SET GLOBAL group_replication_flow_control_member_quota_percent= 50; 233include/assert.inc [group_replication_flow_control_member_quota_percent is correct] 234SET GLOBAL group_replication_flow_control_period= 10; 235include/assert.inc [group_replication_flow_control_period is correct] 236SET GLOBAL group_replication_flow_control_hold_percent= 15; 237include/assert.inc [group_replication_flow_control_hold_percent is correct] 238SET GLOBAL group_replication_flow_control_release_percent= 150; 239include/assert.inc [group_replication_flow_control_release_percent is correct] 240 241############################################################ 242# 13. Set group_replication_flow_control options on command 243# line during server start and then start Group 244# Replication. 245[connection server2] 246include/start_group_replication.inc 247set session sql_log_bin=0; 248CALL mtr.add_suppression("group_replication_flow_control_min_quota cannot be larger than group_replication_flow_control_max_quota"); 249CALL mtr.add_suppression("group_replication_flow_control_min_recovery_quota cannot be larger than group_replication_flow_control_max_quota"); 250CALL mtr.add_suppression("group_replication_flow_control_max_quota cannot be smaller than group_replication_flow_control_min_quota or group_replication_flow_control_min_recovery_quota"); 251set session sql_log_bin=1; 252# restart:--group_replication_group_name=GROUP_REPLICATION_GROUP_NAME --group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_flow_control_max_quota=10 --group_replication_flow_control_min_quota=20 253START GROUP_REPLICATION; 254ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log. 255# restart:--group_replication_group_name=GROUP_REPLICATION_GROUP_NAME --group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_flow_control_min_quota=20 --group_replication_flow_control_max_quota=10 256START GROUP_REPLICATION; 257ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log. 258# restart:--group_replication_group_name=GROUP_REPLICATION_GROUP_NAME --group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS --group_replication_flow_control_min_recovery_quota=20 --group_replication_flow_control_max_quota=10 259START GROUP_REPLICATION; 260ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log. 261 262############################################################ 263# Clean up. 264include/rpl_reconnect.inc 265[connection server1] 266SET GLOBAL group_replication_flow_control_mode= @group_replication_flow_control_mode_save; 267SET GLOBAL group_replication_flow_control_certifier_threshold= @group_replication_flow_control_certifier_threshold_save; 268SET GLOBAL group_replication_flow_control_applier_threshold= @group_replication_flow_control_applier_threshold_save; 269SET GLOBAL group_replication_flow_control_min_quota=@group_replication_flow_control_min_quota_save; 270SET GLOBAL group_replication_flow_control_min_recovery_quota=@group_replication_flow_control_min_recovery_quota_save; 271SET GLOBAL group_replication_flow_control_max_quota=@group_replication_flow_control_max_quota_save; 272SET GLOBAL group_replication_flow_control_member_quota_percent=@group_replication_flow_control_member_quota_percent_save; 273SET GLOBAL group_replication_flow_control_period=@group_replication_flow_control_period_save; 274SET GLOBAL group_replication_flow_control_hold_percent=@group_replication_flow_control_hold_percent_save; 275SET GLOBAL group_replication_flow_control_release_percent=@group_replication_flow_control_release_percent_save; 276SET @@GLOBAL.DEBUG= @debug_saved; 277include/group_replication_end.inc 278