2006-06-01 11:53:27 +02:00
|
|
|
stop slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
start slave;
|
|
|
|
**** On Master ****
|
|
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-03-20 08:52:01 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 222 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
|
|
master-bin.000001 222 Query 1 286 BEGIN
|
|
|
|
master-bin.000001 286 Table_map 1 40 table_id: # (test.t1)
|
2007-03-29 14:21:44 +02:00
|
|
|
master-bin.000001 326 Table_map 1 98 table_id: # (mysql.ndb_apply_status)
|
|
|
|
master-bin.000001 384 Write_rows 1 157 table_id: #
|
|
|
|
master-bin.000001 443 Write_rows 1 195 table_id: #
|
|
|
|
master-bin.000001 481 Write_rows 1 233 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 519 Query 1 584 COMMIT
|
|
|
|
master-bin.000001 584 Query 1 664 use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 664 Query 1 740 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
|
|
a b
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-03-20 08:52:01 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 222 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
|
|
master-bin.000001 222 Query 1 286 BEGIN
|
|
|
|
master-bin.000001 286 Table_map 1 40 table_id: # (test.t1)
|
2007-03-29 14:21:44 +02:00
|
|
|
master-bin.000001 326 Table_map 1 98 table_id: # (mysql.ndb_apply_status)
|
|
|
|
master-bin.000001 384 Write_rows 1 157 table_id: #
|
|
|
|
master-bin.000001 443 Write_rows 1 195 table_id: #
|
|
|
|
master-bin.000001 481 Write_rows 1 233 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 519 Query 1 584 COMMIT
|
|
|
|
master-bin.000001 584 Query 1 664 use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 664 Query 1 740 use `test`; DROP TABLE t1
|
|
|
|
master-bin.000001 740 Query 1 857 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
|
|
master-bin.000001 857 Query 1 921 BEGIN
|
|
|
|
master-bin.000001 921 Table_map 1 40 table_id: # (test.t1)
|
|
|
|
master-bin.000001 961 Table_map 1 98 table_id: # (mysql.ndb_apply_status)
|
|
|
|
master-bin.000001 1019 Write_rows 1 157 table_id: #
|
|
|
|
master-bin.000001 1078 Write_rows 1 195 table_id: #
|
|
|
|
master-bin.000001 1116 Write_rows 1 233 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 1154 Query 1 1219 COMMIT
|
|
|
|
master-bin.000001 1219 Query 1 1283 BEGIN
|
|
|
|
master-bin.000001 1283 Table_map 1 40 table_id: # (test.t1)
|
|
|
|
master-bin.000001 1323 Table_map 1 98 table_id: # (mysql.ndb_apply_status)
|
|
|
|
master-bin.000001 1381 Write_rows 1 157 table_id: #
|
|
|
|
master-bin.000001 1440 Delete_rows 1 191 table_id: #
|
|
|
|
master-bin.000001 1474 Delete_rows 1 225 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 1508 Query 1 1573 COMMIT
|
|
|
|
master-bin.000001 1573 Query 1 1649 use `test`; DROP TABLE t1
|