MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rpl_show_relaylog_events.inc
1 -- connection master
2 -- source include/rpl_reset.inc
3 
4 -- connection master
5 
6 CREATE TABLE t1 (a INT);
7 INSERT INTO t1 VALUES (1);
8 INSERT INTO t1 VALUES (2);
9 INSERT 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 extra/rpl_tests/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 extra/rpl_tests/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 extra/rpl_tests/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 
43 FLUSH LOGS;
44 -- connection master
45 FLUSH LOGS;
46 DROP TABLE t1;
47 
48 --let $is_relay_log= 0
49 --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
50 --source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
51 
52 --sync_slave_with_master
53 --let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
54 --source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
55 
56 --let $is_relay_log= 1
57 --let $binlog_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
58 --source extra/rpl_tests/rpl_show_log_events_with_varying_options.inc
59 
60 
61 # clear show_binlog_event/show_relaylog_events parameters
62 let $binlog_file= ;
63 let $binlog_limit= ;