Debian Codegraph @

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

raw
1 ################################################################################
2 # This test verifies that a deprecation warning is thrown/logged when
3 # group_replication_recovery_complete_at variable is used.
4 #
5 # Test:
6 # 0. The test requires one server: server1.
7 # 1. Set group_replication_recovery_complete_at to TRANSACTIONS_APPLIED
8 # A deprecation warning is thrown on the client session.
9 # 2. Set group_replication_recovery_complete_at to TRANSACTIONS_CERTIFIED
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_recovery_complete_at 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_recovery_complete_at 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_recovery_complete_at to TRANSACTIONS_APPLIED
28 --echo # A deprecation warning is thrown on the client session.
29 --let $rpl_connection_name= server1
30 --source include/rpl_connection.inc
31 --let $saved_group_replication_recovery_complete_at= `SELECT @@GLOBAL.group_replication_recovery_complete_at;`
32 SET @@GLOBAL.group_replication_recovery_complete_at= "TRANSACTIONS_APPLIED";
33
34
35 --echo
36 --echo ############################################################
37 --echo # 2. Set group_replication_recovery_complete_at to TRANSACTIONS_CERTIFIED
38 --echo # A deprecation warning is thrown on the client session.
39 --let $rpl_connection_name= server1
40 --source include/rpl_connection.inc
41 SET @@GLOBAL.group_replication_recovery_complete_at= "TRANSACTIONS_CERTIFIED";
42
43
44 --echo
45 --echo ############################################################
46 --echo # 3. Start Group Replication from client session.
47 --echo # A deprecation warning is thrown on the client session because
48 --echo # group_replication_recovery_complete_at is not the default one.
49 --let $rpl_connection_name= server1
50 --source include/rpl_connection.inc
51 --source include/start_and_bootstrap_group_replication.inc
52
53 --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
54 --let $assert_only_after= CURRENT_TEST: group_replication.gr_group_replication_recovery_complete_at_deprecation
55 --let $assert_select= The syntax 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release.
56 --let $assert_count= 0
57 --let $assert_text= Deprecation warning is not logged on the error log when thrown in client.
58 --source include/assert_grep.inc
59
60
61 --echo
62 --echo ############################################################
63 --echo # 4. Start Group Replication on server start.
64 --echo # A deprecation warning is logged on the error log because
65 --echo # group_replication_recovery_complete_at is not the default one.
66 --let $rpl_connection_name= server1
67 --source include/rpl_connection.inc
68 --let $allow_rpl_inited=1
69 --let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
70 --let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`
71 --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_recovery_complete_at=TRANSACTIONS_CERTIFIED
72 --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
73 --source include/restart_mysqld.inc
74
75 --let $rpl_server_number= 1
76 --source include/rpl_reconnect.inc
77 --let $group_replication_member_state= ONLINE
78 --source include/gr_wait_for_member_state.inc
79
80 --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
81 --let $assert_only_after= CURRENT_TEST: group_replication.gr_group_replication_recovery_complete_at_deprecation
82 --let $assert_select= The syntax 'group_replication_recovery_complete_at' is deprecated and will be removed in a future release.
83 --let $assert_count= 1
84 --let $assert_text= Deprecation warning is logged on the error log.
85 --source include/assert_grep.inc
86
87
88 --echo
89 --echo ############################################################
90 --echo # 5. Cleanup.
91 --let $rpl_connection_name= server1
92 --source include/rpl_connection.inc
93 --replace_result $saved_group_replication_recovery_complete_at GROUP_REPLICATION_RECOVERY_COMPLETE_AT
94 --eval SET @@GLOBAL.group_replication_recovery_complete_at= $saved_group_replication_recovery_complete_at
95 --source include/group_replication_end.inc