Debian Codegraph @

mysql-test/suite/ndb_binlog/t/ndb_binlog_log_apply_status.test

raw
1 -- source include/have_ndb.inc
2 -- source include/have_binlog_format_mixed_or_row.inc
3
4 create table test.t1(a int primary key) engine=ndb;
5
6 set global ndb_log_apply_status=Off;
7 show variables like '%ndb_log_apply_status%';
8
9 reset slave;
10 reset master;
11 --echo Should have empty apply status table
12 select * from mysql.ndb_apply_status;
13
14 --echo Dummy incoming ndb_apply_status updates, should not be logged
15 begin;
16 insert into mysql.ndb_apply_status values (555, 12345, 'binlog.000001', 20, 30);
17 insert into mysql.ndb_apply_status values (666, 67890, 'binlog.000001', 50, 60);
18 replace into test.t1 values (1); # So that epoch is non-empty
19 commit;
20
21 --echo Should not see ndb_apply_status updates in the Binlog
22
23 # Synchronise with Binlog
24 --disable_result_log
25 show binlog events;
26 --enable_result_log
27
28 let $Binlog_condition= like '%binlog.000001%';
29 --source suite/ndb_binlog/t/ndb_binlog_get_binlog_stmts_basic.inc
30
31 set global ndb_log_apply_status=On;
32 show variables like '%ndb_log_apply_status%';
33
34 reset slave;
35 reset master;
36 --echo Should have empty apply status table
37 select * from mysql.ndb_apply_status;
38
39 --echo Dummy incoming ndb_apply_status updates, should be logged
40 begin;
41 insert into mysql.ndb_apply_status values (555, 12345, 'binlog.000001', 20, 30);
42 insert into mysql.ndb_apply_status values (666, 67890, 'binlog.000001', 50, 60);
43 replace into test.t1 values (2); # So that epoch is non-empty
44 commit;
45
46 --echo Should see ndb_apply_status updates in the Binlog
47
48 # Synchronise with Binlog
49 --disable_result_log
50 show binlog events;
51 --enable_result_log
52
53 let $Binlog_condition= like '%binlog.000001%';
54 --source suite/ndb_binlog/t/ndb_binlog_get_binlog_stmts_basic.inc
55
56 set global ndb_log_apply_status=Off;
57 drop table test.t1;