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;
|
2007-11-02 13:00:38 +01:00
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
|
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; DELETE FROM t1
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|
|
|
|
STOP SLAVE;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
DROP TABLE IF EXISTS t1;
|
|
|
|
RESET SLAVE;
|
|
|
|
START SLAVE;
|
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=InnoDB;
|
|
|
|
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;
|
2007-03-30 10:27:08 +02:00
|
|
|
show binlog events from <binlog_start>;
|
2006-06-01 11:53:27 +02:00
|
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
2007-11-02 13:00:38 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=InnoDB
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
|
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
2007-12-14 14:40:45 +01:00
|
|
|
master-bin.000001 # Query # # use `test`; BEGIN
|
2007-03-30 10:27:08 +02:00
|
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
|
|
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
|
|
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
|
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
2007-11-02 13:00:38 +01:00
|
|
|
RESET MASTER;
|