Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # Test that SHOW RELAYLOG EVENTS works with different options for the
4 # LIMIT clause, as well as with and without FROM clause, and with and
5 # without IN clause.
6 #
7 # ==== Implementation ====
8 #
9 # This test issues SHOW RELAYLOG EVENTS on slave after
10 # some statements have been issued.
11 #
12 # ==== References ====
13 #
14 # BUG#28777 SHOW BINLOG EVENTS does not work on relay log files
15 # - test created in this wl
16 # WL#7592 GTIDS: generate gtid_log_event always
17 # - unified all the different files that were part of this test
18
19 --source include/not_group_replication_plugin.inc
20 --source include/master-slave.inc
21
22 --echo ==== Initialize ====
23
24 CREATE TABLE t1 (a INT);
25 FLUSH LOGS;
26 CREATE TABLE t2 (a INT);
27 DROP TABLE t1;
28 DROP TABLE t2;
29 --source include/sync_slave_sql_with_master.inc
30
31 --echo ==== Test ====
32
33 # Show relay log
34 --let $is_relay_log= 1
35
36 # Unify query_log_event(COMMIT) and Xid_log_event so that result file
37 # becomes independent of whether transactional or nontransactional
38 # engine is used.
39 --let $mask_binlog_commit_events= 1
40
41 # Do not mask away gtid events
42 --let $keep_gtid_events= 0
43
44 # Skip Previous_gtid, Rotate, and Format_desc
45 --let $binlog_skip_all_header_events= 1
46
47 # Echo the SHOW statement (with nondeterministic fields masked)
48 --let $show_binlog_events_verbose= 1
49
50 # Get the last relay log file
51 --let $binlog_file= LAST
52
53 # 1. Test with no LIMIT clause
54 --let $binlog_limit=
55 --source include/show_relaylog_events.inc
56
57 # 2. Test with LIMIT COUNT clause
58 --let $binlog_limit= 1
59 --source include/show_relaylog_events.inc
60
61 # 3. Test with LIMIT OFFSET, COUNT clause
62 --let $binlog_limit= 1,3
63 --source include/show_relaylog_events.inc
64
65 # 4. Test showing default relay log file
66 --let $binlog_file=
67 --let $binlog_limit=
68 --source include/show_relaylog_events.inc
69
70 --echo ==== Cleanup ====
71
72 --source include/rpl_end.inc