1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
--source include/have_ndb.inc
--source include/have_log_bin.inc
--source include/have_debug.inc
use test;
reset master;
create table t1 (a int primary key, b int) engine=ndb;
--echo Low level transport test
set global debug='+d,ndb_injector_set_event_conflict_flags';
--echo Two inserts to the same table, with nothing else in the epoch,
--echo will be grouped together in one binlog event, as the
--echo extra row info is the same.
insert into test.t1 values (1,1), (2,2);
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--echo A separate delete.
delete from test.t1 where a=2;
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`;
--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/binlog.000001 > $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql
create table raw_binlog_rows (txt varchar(1000));
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
select replace(txt, '\r', '') as txt from raw_binlog_rows where txt like '### Extra row ndb info: data_format:%';
drop table raw_binlog_rows;
--enable_query_log
set global debug='';
delete from test.t1;
# Wait for delete to be written to binlog before RESET MASTER
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
reset master;
--echo Specific flag settings test : Reflect
set global debug='+d,ndb_set_reflect_anyvalue';
--echo Two inserts to the same table, with nothing else in the epoch,
--echo will be grouped together in one binlog event, as the
--echo extra row info is the same.
insert into test.t1 values (1,1), (2,2);
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--echo A separate delete.
delete from test.t1 where a=2;
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`;
--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/binlog.000001 > $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql
create table raw_binlog_rows (txt varchar(1000));
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
select replace(txt, '\r', '') as txt from raw_binlog_rows where txt like '### Extra row ndb info: data_format:%';
drop table raw_binlog_rows;
--enable_query_log
set global debug='';
delete from test.t1;
# Wait for delete to be written to binlog before RESET MASTER
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
reset master;
--echo Specific flag settings test : Refresh
set global debug='+d,ndb_set_refresh_anyvalue';
--echo Two inserts to the same table, with nothing else in the epoch,
--echo will be grouped together in one binlog event, as the
--echo extra row info is the same.
insert into test.t1 values (1,1), (2,2);
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--echo A separate delete.
delete from test.t1 where a=2;
# Wait for epoch boundary
--disable_query_log
--disable_result_log
show binlog events;
--enable_result_log
--enable_query_log
--disable_query_log
let $MYSQLD_DATADIR= `select @@datadir;`;
--exec $MYSQL_BINLOG --verbose $MYSQLD_DATADIR/binlog.000001 > $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql
create table raw_binlog_rows (txt varchar(1000));
--eval load data local infile '$MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql' into table raw_binlog_rows columns terminated by '\n';
select replace(txt, '\r', '') as txt from raw_binlog_rows where txt like '### Extra row ndb info: data_format:%';
drop table raw_binlog_rows;
--enable_query_log
set global debug='';
drop table t1;
--remove_file $MYSQLTEST_VARDIR/tmp/ndb_binlog_mysqlbinlog.sql
|