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 ****
|
|
|
|
SET SESSION BINLOG_FORMAT=STATEMENT;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Query 1 310 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 310 Query 1 390 use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 390 Query 1 466 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
SET SESSION BINLOG_FORMAT=MIXED;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=MIXED;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Query 1 310 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 310 Query 1 390 use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 390 Query 1 466 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
SET SESSION BINLOG_FORMAT=ROW;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=ROW;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
TRUNCATE TABLE t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Table_map 1 253 table_id: # (test.t1)
|
|
|
|
master-bin.000001 253 Write_rows 1 300 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 300 Query 1 380 use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 380 Query 1 456 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
SET SESSION BINLOG_FORMAT=STATEMENT;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=STATEMENT;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Query 1 310 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 310 Query 1 387 use `test`; DELETE FROM t1
|
|
|
|
master-bin.000001 387 Query 1 463 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
SET SESSION BINLOG_FORMAT=MIXED;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=MIXED;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Query 1 310 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 310 Query 1 387 use `test`; DELETE FROM t1
|
|
|
|
master-bin.000001 387 Query 1 463 use `test`; DROP TABLE t1
|
2006-06-01 11:53:27 +02:00
|
|
|
**** On Master ****
|
|
|
|
SET SESSION BINLOG_FORMAT=ROW;
|
|
|
|
SET GLOBAL BINLOG_FORMAT=ROW;
|
|
|
|
CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM;
|
|
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
**** On Slave ****
|
|
|
|
INSERT INTO t1 VALUE (3,3);
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
1 1
|
|
|
|
2 2
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DELETE FROM t1;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
**** On Slave ****
|
|
|
|
SELECT * FROM t1;
|
|
|
|
a b
|
|
|
|
3 3
|
|
|
|
**** On Master ****
|
|
|
|
DROP TABLE t1;
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-02-12 16:46:42 +01:00
|
|
|
master-bin.000001 4 Format_desc 1 105 Server ver: SERVER_VERSION, Binlog ver: 4
|
|
|
|
master-bin.000001 105 Query 1 213 use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM
|
|
|
|
master-bin.000001 213 Table_map 1 253 table_id: # (test.t1)
|
|
|
|
master-bin.000001 253 Write_rows 1 300 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 300 Table_map 1 340 table_id: # (test.t1)
|
|
|
|
master-bin.000001 340 Delete_rows 1 387 table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 387 Query 1 463 use `test`; DROP TABLE t1
|