1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
################################################################################
# This test verifies that a deprecation warning is thrown/logged when
# group_replication_view_change_uuid variable is used.
#
# Test:
# 0. The test requires one server: server1.
# 1. Set group_replication_view_change_uuid.
# A deprecation warning is thrown on the client session.
# 2. Set group_replication_view_change_uuid to some GTID.
# A deprecation warning is thrown on the client session.
# 3. Start Group Replication from client session.
# A deprecation warning is thrown on the client session because
# group_replication_view_change_uuid is not the default one.
# 4. Start Group Replication on server start.
# A deprecation warning is logged on the error log because
# group_replication_view_change_uuid is not the default one.
# 5. Cleanup.
################################################################################
--source include/big_test.inc
--source include/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source include/group_replication.inc
--echo
--echo ############################################################
--echo # 1. Set group_replication_view_change_uuid.
--echo # A deprecation warning is thrown on the client session.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $sysvars_to_save = [ "GLOBAL.group_replication_view_change_uuid" ]
--source include/save_sysvars.inc
SET @@GLOBAL.group_replication_view_change_uuid= "AUTOMATIC";
--echo
--echo ############################################################
--echo # 2. Set group_replication_view_change_uuid to some GTID.
--echo # A deprecation warning is thrown on the client session.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
SET @@GLOBAL.group_replication_view_change_uuid= "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
--echo
--echo ############################################################
--echo # 3. Start Group Replication from client session.
--echo # A deprecation warning is thrown on the client session because
--echo # group_replication_view_change_uuid is not the default one.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $warning_count= query_get_value(SELECT COUNT(*) AS COUNT FROM performance_schema.error_log WHERE error_code='MY-011069' AND data LIKE '%The syntax \'group_replication_view_change_uuid\' is deprecated and will be removed in a future release.%', COUNT, 1)
--source include/start_and_bootstrap_group_replication.inc
--let $wait_condition= SELECT COUNT(*)=$warning_count FROM performance_schema.error_log WHERE error_code='MY-011069' AND data LIKE '%The syntax \'group_replication_view_change_uuid\' is deprecated and will be removed in a future release.%'
--source include/wait_condition.inc
--echo
--echo ############################################################
--echo # 4. Start Group Replication on server start.
--echo # A deprecation warning is logged on the error log because
--echo # group_replication_view_change_uuid is not the default one.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $warning_count= query_get_value(SELECT COUNT(*) AS COUNT FROM performance_schema.error_log WHERE error_code='MY-011069' AND data LIKE '%The syntax \'group_replication_view_change_uuid\' is deprecated and will be removed in a future release.%', COUNT, 1)
--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 $restart_parameters=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_bootstrap_group=1 --group_replication_start_on_boot=1 --group_replication_view_change_uuid="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS
--source include/restart_mysqld.inc
--let $rpl_server_number= 1
--source include/rpl_reconnect.inc
--let $group_replication_member_state= ONLINE
--source include/gr_wait_for_member_state.inc
--inc $warning_count
--let $wait_condition= SELECT COUNT(*)=$warning_count FROM performance_schema.error_log WHERE error_code='MY-011069' AND data LIKE '%The syntax \'group_replication_view_change_uuid\' is deprecated and will be removed in a future release.%'
--source include/wait_condition.inc
--echo
--echo ############################################################
--echo # 5. Cleanup.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/stop_group_replication.inc
--source include/restore_sysvars.inc
--source include/group_replication_end.inc
|