| 1 |
create table test.t1(a int primary key) engine=ndb; |
| 2 |
set global ndb_log_apply_status=Off; |
| 3 |
show variables like '%ndb_log_apply_status%'; |
| 4 |
Variable_name Value |
| 5 |
ndb_log_apply_status OFF |
| 6 |
reset slave; |
| 7 |
Warnings: |
| 8 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 9 |
reset master; |
| 10 |
Should have empty apply status table |
| 11 |
select * from mysql.ndb_apply_status; |
| 12 |
server_id epoch log_name start_pos end_pos |
| 13 |
Dummy incoming ndb_apply_status updates, should not be logged |
| 14 |
begin; |
| 15 |
insert into mysql.ndb_apply_status values (555, 12345, 'binlog.000001', 20, 30); |
| 16 |
insert into mysql.ndb_apply_status values (666, 67890, 'binlog.000001', 50, 60); |
| 17 |
replace into test.t1 values (1); |
| 18 |
commit; |
| 19 |
Should not see ndb_apply_status updates in the Binlog |
| 20 |
show binlog events; |
| 21 |
select txt from binlog_stmts where txt like '%binlog.000001%' order by txt; |
| 22 |
txt |
| 23 |
set global ndb_log_apply_status=On; |
| 24 |
show variables like '%ndb_log_apply_status%'; |
| 25 |
Variable_name Value |
| 26 |
ndb_log_apply_status ON |
| 27 |
reset slave; |
| 28 |
Warnings: |
| 29 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 30 |
reset master; |
| 31 |
Should have empty apply status table |
| 32 |
select * from mysql.ndb_apply_status; |
| 33 |
server_id epoch log_name start_pos end_pos |
| 34 |
Dummy incoming ndb_apply_status updates, should be logged |
| 35 |
begin; |
| 36 |
insert into mysql.ndb_apply_status values (555, 12345, 'binlog.000001', 20, 30); |
| 37 |
insert into mysql.ndb_apply_status values (666, 67890, 'binlog.000001', 50, 60); |
| 38 |
replace into test.t1 values (2); |
| 39 |
commit; |
| 40 |
Should see ndb_apply_status updates in the Binlog |
| 41 |
show binlog events; |
| 42 |
select txt from binlog_stmts where txt like '%binlog.000001%' order by txt; |
| 43 |
txt |
| 44 |
INSERT INTO `mysql`.`ndb_apply_status` SET @1=555 @2=12345 @3='binlog.000001' @4=20 @5=30 |
| 45 |
INSERT INTO `mysql`.`ndb_apply_status` SET @1=666 @2=67890 @3='binlog.000001' @4=50 @5=60 |
| 46 |
set global ndb_log_apply_status=Off; |
| 47 |
drop table test.t1; |