1#
2# Purpose:
3#   This test validates that after issuing the `SLAVE RESET ALL` command,
4# any corresponding IGNORE_DOMAIN_IDS/DO_DOMAIN_IDS and IGNORE_SERVER_IDS
5# values are cleared.
6#
7#
8# Methodology:
9#   To ensure the filtering variables are properly cleared after issuing
10# SLAVE RESET ALL, we categorize different combinations of allowable input
11# into three different options, and ensure that the variables are cleared for
12# each category. The categories are as follows:
13#   Category 1) DO_DOMAIN_IDS and IGNORE_SERVER_IDS specified together
14#   Category 2) IGNORE_DOMAIN_IDS and IGNORE_SERVER_IDS specified together
15#   Category 3) Null check - edge case with all empty lists to ensure a lack
16#               of specification doesn't break anything
17#
18#   To specify the values, the variables are set in `CHANGE MASTER TO`. To
19# ensure the slave state is correct, we test the domain/server id filtering
20# variable values at the following times while testing each category.
21#
22#   Before CHANGE MASTER TO the filtering variables are tested to all be
23# empty.
24#
25#   After CHANGE MASTER TO the variables are tested to ensure they reflect
26# those set in the CHANGE MASTER command.
27#
28#   After RESET SLAVE ALL the filtering variables are tested to all be
29# empty.
30#
31
32--source include/master-slave.inc
33--source include/have_debug.inc
34
35--connection slave
36--source include/stop_slave.inc
37
38--echo #
39--echo # Category 1) DO_DOMAIN_IDS and IGNORE_SERVER_IDS specified together
40--echo #
41--let $_do_domain_ids= (1)
42--let $_ignore_domain_ids= ()
43--let $_ignore_server_ids= (3)
44--source include/rpl_reset_slave_all_check.inc
45
46--echo #
47--echo # Category 2) IGNORE_DOMAIN_IDS and IGNORE_SERVER_IDS specified together
48--echo #
49--let $_do_domain_ids= ()
50--let $_ignore_domain_ids= (2)
51--let $_ignore_server_ids= (3)
52--source include/rpl_reset_slave_all_check.inc
53
54--echo #
55--echo # Category 3) Null check - edge case with all empty lists to ensure a
56--echo # lack of specification doesn't break anything
57--echo #
58--let $_do_domain_ids= ()
59--let $_ignore_domain_ids= ()
60--let $_ignore_server_ids= ()
61--source include/rpl_reset_slave_all_check.inc
62
63
64--echo ############################
65--echo # Cleanup
66--echo ############################
67--connection slave
68--replace_result $MASTER_MYPORT MASTER_MYPORT
69eval change master to master_port=$MASTER_MYPORT, master_host='127.0.0.1', master_user='root';
70--source include/start_slave.inc
71
72--source include/rpl_end.inc
73