Debian Codegraph @

mysql-test/suite/group_replication/t/gr_view_change_uuid_deprecation.test

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