← Back
Editing: gr_group_name_validation_on_boot.test
################################################################################ # BUG#21141822 - GR(USABILITY): GROUP_REPLICATION_GROUP_NAME VAR IS NOT # VALIDATED ON GROUP START # BUG#21456559 - GR-GROUP-NAME SETS TO INCORRECT VALUE IF PASSED WITH # 'GR-START-ON-BOOT'=ON # # This test verifies that group_name validation is done correctly when # starting on boot as well as when we pass it manually in the test. # Before this patch, the group_name with a length longer than the length of # the valid UUID was being accepted which was causing problem going forward # like assigning an invalid GTID to the GTID_EXECUTED value. # # Test: # 0. The test requires one server: M1. # 1. Starting the server with invalid group_name being passed on boot. # 2. Asserting that the error due to invalid group name is being thrown. # 3. Starting the server with boot option OFF. # 4. Passing an incorrect value to group_name throws an error. ################################################################################ --source ../inc/have_group_replication_plugin.inc --let $group_replication_group_name_invalid=aaaaaaaa-aaaa-aaaa-aaaa-invalidvalueused --eval SET GLOBAL group_replication_group_name= "aeaeaeae-aeae-aeae-aeae-aeaeaeaeaeae" SET SESSION sql_log_bin=0; call mtr.add_suppression("is not a valid UUID"); call mtr.add_suppression("'group_replication' init function returned error"); SET SESSION sql_log_bin=1; --echo --let $rpl_connection_name= server1 --source include/rpl_connection.inc --echo [ON SERVER1] --source ../inc/start_and_bootstrap_group_replication.inc # Phase 1: Starting the server with invalid group_name being passed on boot --let $allow_rpl_inited=1 --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address` --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds` --let $_group_replication_group_whitelist= `SELECT @@GLOBAL.group_replication_ip_whitelist` --let $restart_parameters=restart:--group-replication-start-on-boot=1 --group-replication-group-name=$group_replication_group_name_invalid --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_ip_whitelist=$_group_replication_group_whitelist --replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST --source include/restart_mysqld.inc --echo # Asserting that the error due to invalid group name is being thrown. --let $grep_file=$MYSQLTEST_VARDIR/tmp/group_replication_group_name_error_on_boot.err --let $grep_pattern=is not a valid UUID --let $grep_output= print_count --source include/grep_pattern.inc # Starting the server with boot option OFF --let $allow_rpl_inited=1 --let $restart_parameters=restart:--group-replication-start-on-boot=0 --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_bootstrap_group=1 --group_replication_ip_whitelist=$_group_replication_group_whitelist --replace_result $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST --source include/restart_mysqld.inc # Phase 2: Passing an incorrect value to group_name throws an error --error ER_WRONG_VALUE_FOR_VAR --eval SET GLOBAL group_replication_group_name="$group_replication_group_name_invalid" --source ../inc/gr_clear_configuration.inc
Save File
Cancel