Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # Test verifies that when "replicate_annotate_row_events" are enabled on slave
4 # the DML operations on blackhole engine will be successful. It also ensures
5 # that Annotate events are logged into slave's binary log.
6 #
7 # ==== Implementation ====
8 #
9 # Steps:
10 # 0 - Enable "replicate_annotate_row_events" on slave and do DML operations
11 # on master.
12 # 1 - Slave server will successfully apply the DML operations and it is in
13 # sync with master.
14 # 2 - Verify that the "show binlog events" prints all annotate events.
15 # 3 - Stream the slave's binary log using "mysqlbinlog" tool and verify
16 # that the Annotate events are being displayed.
17 #
18 # ==== References ====
19 #
20 # MDEV-11094: Blackhole table updates on slave fail when row annotation is
21 # enabled
22
23 source include/have_blackhole.inc;
24 source include/have_binlog_format_row.inc;
25 source include/binlog_start_pos.inc;
26 source include/master-slave.inc;
27
28 SET timestamp=1000000000;
29 RESET MASTER;
30 connection slave;
31 SET timestamp=1000000000;
32 RESET MASTER;
33
34 connection master;
35 source include/rpl_blackhole_basic.test;
36
37 # Verify on slave.
38 connection slave;
39 FLUSH LOGS;
40 --replace_column 2 # 5 #
41 --replace_result $binlog_start_pos <start_pos>
42 --replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
43 --eval show binlog events in 'slave-bin.000001' from $binlog_start_pos
44
45 let $MYSQLD_DATADIR= `select @@datadir`;
46 --replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ /xid=\d*/xid=<xid>/
47 --exec $MYSQL_BINLOG --base64-output=decode-rows --skip-gtid-strict-mode $MYSQLD_DATADIR/slave-bin.000001
48
49 source include/rpl_end.inc;