1-- connection master
2-- source include/rpl_reset.inc
3
4-- connection master
5
6CREATE TABLE t1 (a INT);
7INSERT INTO t1 VALUES (1);
8INSERT INTO t1 VALUES (2);
9INSERT INTO t1 VALUES (3);
10
11# PART I
12#
13# SHOWs contents of binary logs on the master and both, binary and
14# relay logs, on the slave.
15#
16
17--let $is_relay_log= 0
18--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
19--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
20
21--sync_slave_with_master
22--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
23--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
24
25--let $is_relay_log= 1
26--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
27--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
28
29#
30# PART II
31#
32# Although this second part of the test may seem redudant it is
33# actually needed to assert that SHOW RELAYLOG EVENTS works properly
34# with respect to the ordering of the relay log in relay-log.index.
35#
36# If no file is specified with "IN" then first relay log file in
37# relay-log.index (ie, the oldest one) should be picked and its
38# contents displayed. The same happens for SHOW BINLOG EVENTS, so we
39# show them both. All in all, this is the reason for re-assert after
40# MASTER and SLAVE's FLUSH LOGS operations.
41#
42
43FLUSH LOGS;
44--source include/wait_for_binlog_checkpoint.inc
45-- connection master
46FLUSH LOGS;
47--source include/wait_for_binlog_checkpoint.inc
48DROP TABLE t1;
49
50--let $is_relay_log= 0
51--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
52--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
53
54--sync_slave_with_master
55--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
56--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
57
58--let $is_relay_log= 1
59--let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
60--source suite/rpl/include/rpl_show_log_events_with_varying_options.inc
61
62
63# clear show_binlog_event/show_relaylog_events parameters
64let $binlog_file= ;
65let $binlog_limit= ;
66