| 1 |
-- source include/have_ndb.inc |
| 2 |
-- source include/have_binlog_format_mixed_or_row.inc |
| 3 |
reset master; |
| 4 |
|
| 5 |
# |
| 6 |
# None of the below statements should be binlogged |
| 7 |
# since server is started with --binlog-ignore-db=mysqltest |
| 8 |
# |
| 9 |
|
| 10 |
create database mysqltest; |
| 11 |
use mysqltest; |
| 12 |
create table t1 (a int primary key, b int) engine=ndb; |
| 13 |
insert into t1 values (1, 1); |
| 14 |
|
| 15 |
use test; |
| 16 |
insert into mysqltest.t1 values(2,2); |
| 17 |
|
| 18 |
-- source include/show_binlog_events.inc |
| 19 |
|
| 20 |
drop database mysqltest; |
| 21 |
|
| 22 |
--echo --bug58698 Epoch not in ndb_apply_status |
| 23 |
reset master; |
| 24 |
use mysql; |
| 25 |
|
| 26 |
--echo -- MyISAM table in mysql db |
| 27 |
create table invisible(a int primary key) engine=myisam; |
| 28 |
insert into invisible values (1); |
| 29 |
insert into invisible values (2); |
| 30 |
delete from invisible; |
| 31 |
drop table invisible; |
| 32 |
|
| 33 |
--echo -- Should be nothing in binlog |
| 34 |
-- source include/show_binlog_events.inc |
| 35 |
|
| 36 |
--echo -- Ndb table in mysql db |
| 37 |
create table invisible(a int primary key) engine=ndb; |
| 38 |
insert into invisible values (1); |
| 39 |
insert into invisible values (2); |
| 40 |
delete from invisible; |
| 41 |
drop table invisible; |
| 42 |
|
| 43 |
--echo -- Should be nothing in binlog |
| 44 |
-- source include/show_binlog_events.inc |
| 45 |
|
| 46 |
--echo -- ndb_binlog_index table (MyISAM) in mysql db |
| 47 |
|
| 48 |
insert into ndb_binlog_index values (12, 'F', 23, 0, 0, 0, 0, 3, 44, 55, 66, 'H'); |
| 49 |
insert into ndb_binlog_index values (20, 'G', 23, 0, 0, 0, 0, 5, 44, 55, 77, 'I'); |
| 50 |
|
| 51 |
delete from ndb_binlog_index; |
| 52 |
|
| 53 |
--echo -- Should be nothing in binlog |
| 54 |
-- source include/show_binlog_events.inc |
| 55 |
|
| 56 |
--echo -- Non-ignored db (test2) |
| 57 |
create database test2; |
| 58 |
use test2; |
| 59 |
|
| 60 |
create table t1 (a int primary key) engine=ndb; |
| 61 |
|
| 62 |
insert into t1 values (1); |
| 63 |
insert into t1 values (2); |
| 64 |
|
| 65 |
delete from t1; |
| 66 |
|
| 67 |
drop table t1; |
| 68 |
|
| 69 |
drop database test2; |
| 70 |
|
| 71 |
--echo -- Should have events in Binlog, *including ndb_apply_status* |
| 72 |
use test; |
| 73 |
create table raw_binlog_rows (txt varchar(1000)); |
| 74 |
--disable_query_log |
| 75 |
let $MYSQLD_DATADIR= `select @@datadir;`; |
| 76 |
--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/binlog.000001 > $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql |
| 77 |
|
| 78 |
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n'; |
| 79 |
--enable_query_log |
| 80 |
|
| 81 |
select count(1) > 0 from raw_binlog_rows where txt like '%ndb_apply_status%'; |
| 82 |
|
| 83 |
drop table raw_binlog_rows; |
| 84 |
--remove_file $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql |