2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
create table t1 (a int key, b int) engine innodb;
8
create table t2 (a int key, b int) engine innodb;
9
alter table t1 engine ndb;
10
alter table t2 engine ndb;
11
insert into t1 values (1,2);
12
select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status;
13
@start_pos:=start_pos @end_pos:=end_pos
15
show binlog events from <start_pos> limit 1;
16
Log_name Pos Event_type Server_id End_log_pos Info
17
master-bin.000001 <start_pos> Query 1 # use `test`; insert into t1 values (1,2)
18
show binlog events from <start_pos> limit 1,1;
19
Log_name Pos Event_type Server_id End_log_pos Info
20
master-bin.000001 # Xid 1 445 COMMIT /* XID */
22
insert into t1 values (2,3);
23
insert into t2 values (3,4);
25
select @start_pos:=start_pos, @end_pos:=end_pos from mysql.ndb_apply_status;
26
@start_pos:=start_pos @end_pos:=end_pos
28
show binlog events from <start_pos> limit 1;
29
Log_name Pos Event_type Server_id End_log_pos Info
30
master-bin.000001 <start_pos> Query 1 # use `test`; BEGIN
31
show binlog events from <start_pos> limit 1,2;
32
Log_name Pos Event_type Server_id End_log_pos Info
33
master-bin.000001 # Query # # use `test`; insert into t1 values (2,3)
34
master-bin.000001 # Query # # use `test`; insert into t2 values (3,4)
35
show binlog events from <start_pos> limit 3,1;
36
Log_name Pos Event_type Server_id End_log_pos Info
37
master-bin.000001 # Xid 1 <end_pos> COMMIT /* XID */