Debian Codegraph @

mysql-test/suite/rpl/t/rpl_show_replica_auth_info.test

raw
1 # ==== Purpose ====
2 #
3 # Verify that --show-replica-auth-info works as expected
4 #
5 # ==== Requiremets ====
6 #
7 # R1. When source server is started without --show-replica-auth-info or
8 # --show-slave-auth-info:
9 # R1.1. Server should not write deprecation warning to the error log.
10 # R1.2. SHOW REPLICAS should not include USER and PASSWORD columns.
11 # R1.3. SHOW SLAVE HOSTS should not include USER and PASSWORD columns.
12 #
13 # R2. When source server is started with --show-replica-auth-info:
14 # R2.1. Server should not write deprecation warning to the error log.
15 # R2.2. SHOW REPLICAS should include USER and PASSWORD columns.
16 # R2.3. SHOW SLAVE HOSTS should include USER and PASSWORD columns.
17 #
18 # R3. When source server is started with --show-slave-auth-info:
19 # R3.1. Server should write deprecation warning to the error log.
20 # R3.2. SHOW REPLICAS should include USER and PASSWORD columns.
21 # R3.3. SHOW SLAVE HOSTS should include USER and PASSWORD columns.
22
23 # Test is binlog_format-agnostic
24 --source include/have_binlog_format_row.inc
25 --source include/master-slave.inc
26
27 --echo ==== Init ====
28
29 # Un-suppress this message
30 --let $suppress_mode = IGNORE_GLOBAL_SUPPRESSIONS
31 --let $messages = The syntax.*show-.*-auth-info.*is deprecated
32 --source include/suppress_messages.inc
33
34 --let $restart = $MYSQL_TMP_DIR/restart.inc
35 --write_file $restart END_OF_PROCEDURE
36 --source include/rpl_connection_slave.inc
37 --source include/stop_slave.inc
38 --let $rpl_server_number = 1
39 --source include/rpl_restart_server.inc
40 --source include/rpl_connection_slave.inc
41 --source include/start_slave.inc
42 --source include/rpl_connection_master.inc
43 END_OF_PROCEDURE
44
45 --source include/save_error_log_position.inc
46
47 --echo ==== R2: show-replica-auth-info ====
48
49 --let $rpl_server_parameters = --show-replica-auth-info
50 --source $restart
51
52 --echo * R2.1: No deprecation warning
53 --let $error_pattern = NONE
54 --source include/assert_error_log.inc
55
56 --echo * R2.1, R2.2: Have columns
57 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
58 SHOW REPLICAS;
59 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
60 SHOW SLAVE HOSTS;
61
62 --echo ==== R3: show-slave-auth-info ====
63
64 # Make sure that the following warnings were generated by the restart
65 # and not at some other point in time.
66 --let $error_pattern = NONE
67 --source include/assert_error_log.inc
68
69 --let $rpl_server_parameters = --show-slave-auth-info
70 --source $restart
71
72 --echo * R3.1: Deprecation warning
73 --let $error_pattern = The syntax 'show-slave-auth-info' is deprecated and will be removed in a future release. Please use show-replica-auth-info instead.
74 --source include/assert_error_log.inc
75
76 --echo * R3.2, R3.3: Have columns
77 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
78 SHOW REPLICAS;
79 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
80 SHOW SLAVE HOSTS;
81
82 --echo ==== R1: no command-line options ====
83
84 --let $rpl_server_parameters =
85 --source $restart
86
87 --echo * R1.1: No deprecation warning
88 --let $error_pattern = NONE
89 --source include/assert_error_log.inc
90
91 --echo * R1.2, R1.3: No columns
92 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
93 SHOW REPLICAS;
94 --replace_result $server_2_uuid REPLICA_UUID $SLAVE_MYPORT REPLICA_PORT
95 SHOW SLAVE HOSTS;
96
97 --echo ==== Clean up ====
98
99 --remove_file $restart
100 --source include/rpl_end.inc