| 1 |
CREATE TABLE t3 (dummy INT PRIMARY KEY) ENGINE = NDB; |
| 2 |
DROP TABLE t3; |
| 3 |
reset master; |
| 4 |
reset master; |
| 5 |
CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB; |
| 6 |
INSERT INTO t2 VALUES (1,1),(2,2); |
| 7 |
include/show_binlog_events.inc |
| 8 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 9 |
binlog.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB |
| 10 |
binlog.000001 # Query # # BEGIN |
| 11 |
binlog.000001 # Table_map # # table_id: # (test.t2) |
| 12 |
binlog.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 13 |
binlog.000001 # Write_rows # # table_id: # |
| 14 |
binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 15 |
binlog.000001 # Query # # COMMIT |
| 16 |
select * from t2 order by a; |
| 17 |
a b |
| 18 |
1 1 |
| 19 |
2 2 |
| 20 |
SELECT epoch FROM |
| 21 |
mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1 into @the_epoch; |
| 22 |
SELECT @the_epoch,inserts,updates,deletes,schemaops FROM |
| 23 |
mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; |
| 24 |
@the_epoch inserts updates deletes schemaops |
| 25 |
<the_epoch> 2 0 0 0 |
| 26 |
SELECT * FROM t2 ORDER BY a; |
| 27 |
a b |
| 28 |
1 1 |
| 29 |
2 2 |
| 30 |
DROP TABLE t2; |
| 31 |
include/show_binlog_events.inc |
| 32 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 33 |
binlog.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB |
| 34 |
binlog.000001 # Query # # BEGIN |
| 35 |
binlog.000001 # Table_map # # table_id: # (test.t2) |
| 36 |
binlog.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 37 |
binlog.000001 # Write_rows # # table_id: # |
| 38 |
binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 39 |
binlog.000001 # Query # # COMMIT |
| 40 |
binlog.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ |
| 41 |
SELECT inserts,updates,deletes,schemaops FROM |
| 42 |
mysql.ndb_binlog_index WHERE epoch=<the_epoch>; |
| 43 |
inserts updates deletes schemaops |
| 44 |
2 0 0 0 |
| 45 |
reset master; |
| 46 |
reset master; |
| 47 |
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB; |
| 48 |
INSERT INTO t1 VALUES (1),(2); |
| 49 |
include/show_binlog_events.inc |
| 50 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 51 |
binlog.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB |
| 52 |
binlog.000001 # Query # # BEGIN |
| 53 |
binlog.000001 # Table_map # # table_id: # (test.t1) |
| 54 |
binlog.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 55 |
binlog.000001 # Write_rows # # table_id: # |
| 56 |
binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 57 |
binlog.000001 # Query # # COMMIT |
| 58 |
select epoch FROM |
| 59 |
mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1 into @the_epoch2; |
| 60 |
SELECT @the_epoch2,inserts,updates,deletes,schemaops FROM |
| 61 |
mysql.ndb_binlog_index ORDER BY epoch DESC LIMIT 1; |
| 62 |
@the_epoch2 inserts updates deletes schemaops |
| 63 |
<the_epoch2> 2 0 0 0 |
| 64 |
SELECT inserts,updates,deletes,schemaops FROM |
| 65 |
mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>; |
| 66 |
inserts updates deletes schemaops |
| 67 |
2 0 0 0 |
| 68 |
drop table t1; |
| 69 |
include/show_binlog_events.inc |
| 70 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 71 |
binlog.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB |
| 72 |
binlog.000001 # Query # # BEGIN |
| 73 |
binlog.000001 # Table_map # # table_id: # (test.t1) |
| 74 |
binlog.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) |
| 75 |
binlog.000001 # Write_rows # # table_id: # |
| 76 |
binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F |
| 77 |
binlog.000001 # Query # # COMMIT |
| 78 |
binlog.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
| 79 |
SELECT inserts,updates,deletes,schemaops FROM |
| 80 |
mysql.ndb_binlog_index WHERE epoch > <the_epoch> AND epoch <= <the_epoch2>; |
| 81 |
inserts updates deletes schemaops |
| 82 |
2 0 0 0 |