1 drop table if exists t1,t2,t3;
2 drop table if exists t1,t2,t3;
3 CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB;
7 CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB;
8 INSERT INTO t2 VALUES (1,1),(2,2);
9 show binlog events from <binlog_start>;
10 Log_name Pos Event_type Server_id End_log_pos Info
11 mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB
12 mysqld-bin.000001 # Query 2 # BEGIN
13 mysqld-bin.000001 # Table_map 2 # table_id: # (test.t2)
14 mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
15 mysqld-bin.000001 # Write_rows 2 # table_id: #
16 mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
17 mysqld-bin.000001 # Query 2 # COMMIT
18 select * from t2 order by a;
22 SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM
23 mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
24 @the_epoch:=epoch inserts updates deletes schemaops
26 SELECT * FROM t2 ORDER BY a;
31 show binlog events from <binlog_start>;
32 Log_name Pos Event_type Server_id End_log_pos Info
33 mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB
34 mysqld-bin.000001 # Query 1 # BEGIN
35 mysqld-bin.000001 # Table_map 1 # table_id: # (test.t2)
36 mysqld-bin.000001 # Table_map 1 # table_id: # (mysql.ndb_apply_status)
37 mysqld-bin.000001 # Write_rows 1 # table_id: #
38 mysqld-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
39 mysqld-bin.000001 # Query 1 # COMMIT
40 mysqld-bin.000001 # Query 1 # use `test`; DROP TABLE t2
41 SELECT inserts,updates,deletes,schemaops FROM
42 mysql.ndb_binlog_index WHERE epoch=<the_epoch>;
43 inserts updates deletes schemaops
47 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB;
48 INSERT INTO t1 VALUES (1),(2);
49 show binlog events from <binlog_start>;
50 Log_name Pos Event_type Server_id End_log_pos Info
51 mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB
52 mysqld-bin.000001 # Query 2 # BEGIN
53 mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1)
54 mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
55 mysqld-bin.000001 # Write_rows 2 # table_id: #
56 mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
57 mysqld-bin.000001 # Query 2 # COMMIT
58 SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM
59 mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1;
60 @the_epoch2:=epoch inserts updates deletes schemaops
62 SELECT inserts,updates,deletes,schemaops FROM
63 mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>;
64 inserts updates deletes schemaops
67 show binlog events from <binlog_start>;
68 Log_name Pos Event_type Server_id End_log_pos Info
69 mysqld-bin.000001 # Query 2 # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB
70 mysqld-bin.000001 # Query 2 # BEGIN
71 mysqld-bin.000001 # Table_map 2 # table_id: # (test.t1)
72 mysqld-bin.000001 # Table_map 2 # table_id: # (mysql.ndb_apply_status)
73 mysqld-bin.000001 # Write_rows 2 # table_id: #
74 mysqld-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
75 mysqld-bin.000001 # Query 2 # COMMIT
76 mysqld-bin.000001 # Query 2 # use `test`; drop table t1
77 SELECT inserts,updates,deletes,schemaops FROM
78 mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>;
79 inserts updates deletes schemaops