include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] CREATE TABLE t1 (a int) ENGINE=MyISAM; CREATE TABLE t2 (a int) ENGINE=MyISAM; INSERT INTO t1 VALUES (1), (2), (3); INSERT INTO t2 VALUES (4), (5), (6); CREATE TEMPORARY TABLE IF NOT EXISTS tt1_merge LIKE t1; ALTER TABLE tt1_merge ENGINE=MERGE UNION (t2, t1); CREATE TABLE t1_merge LIKE tt1_merge; include/sync_slave_sql_with_master.inc include/diff_tables.inc [master:test.t1, slave:test.t1] include/diff_tables.inc [master:test.t2, slave:test.t2] UPDATE t1_merge SET a=10 WHERE a=1; DELETE FROM t1_merge WHERE a=10; include/sync_slave_sql_with_master.inc include/diff_tables.inc [master:test.t1, slave:test.t1] include/diff_tables.inc [master:test.t2, slave:test.t2] DROP TABLE t1_merge, t1, t2; include/sync_slave_sql_with_master.inc include/rpl_end.inc include/master-slave.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection master] ######################################################################### # CONFIGURATION ######################################################################### call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); rpl_mixing_engines.inc [commands=configure] CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM; CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = Innodb; INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_3(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_4(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_5(trans_id, stmt_id) VALUES(1,1); INSERT INTO nt_6(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_1(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_2(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_3(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_4(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_5(trans_id, stmt_id) VALUES(1,1); INSERT INTO tt_6(trans_id, stmt_id) VALUES(1,1); CREATE PROCEDURE pc_i_tt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); END| CREATE PROCEDURE pc_i_nt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER) BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); END| CREATE FUNCTION fc_i_tt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); RETURN "fc_i_tt_5_suc"; END| CREATE FUNCTION fc_i_nt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1); RETURN "fc_i_nt_5_suc"; END| CREATE FUNCTION fc_i_nt_3_tt_3_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64) BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO nt_3(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); SELECT max(stmt_id) INTO in_stmt_id FROM tt_3 WHERE trans_id= p_trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id; INSERT INTO tt_3(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id); RETURN "fc_i_nt_3_tt_3_suc"; END| CREATE TRIGGER tr_i_tt_3_to_nt_3 AFTER INSERT ON tt_3 FOR EACH ROW BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= NEW.trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); END| CREATE TRIGGER tr_i_nt_4_to_tt_4 AFTER INSERT ON nt_4 FOR EACH ROW BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM tt_4 WHERE trans_id= NEW.trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); END| CREATE TRIGGER tr_i_tt_5_to_tt_6 AFTER INSERT ON tt_5 FOR EACH ROW BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM tt_6 WHERE trans_id= NEW.trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id, 1), 1) INTO in_stmt_id; INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); END| CREATE TRIGGER tr_i_nt_5_to_nt_6 AFTER INSERT ON nt_5 FOR EACH ROW BEGIN DECLARE in_stmt_id INTEGER; SELECT max(stmt_id) INTO in_stmt_id FROM nt_6 WHERE trans_id= NEW.trans_id; SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id; INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id); INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1); END| ######################################################################### # 1 - MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES ######################################################################### # #1) Generates in the binlog what follows: # --> STMT "B T C" entries, format S. # --> ROW "B T C" entries, format R. # --> MIXED "B T C" entries, format S. # rpl_mixing_engines.inc [commands=T] -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=T-trig] -b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_5(trans_id, stmt_id) VALUES (8, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T-trig << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-trig << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=T-func] -b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- SELECT fc_i_tt_5_suc (9, 1); fc_i_tt_5_suc (9, 1) fc_i_tt_5_suc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T-func << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-func << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=T-proc] -b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_tt_5_suc (10, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> T-proc << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.tt_5) master-bin.000001 # Table_map # # table_id: # (test.tt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ -e-e-e-e-e-e-e-e-e-e-e- >> T-proc << -e-e-e-e-e-e-e-e-e-e-e- # #1.e) Generates in the binlog what follows: # --> STMT empty. # --> ROW empty. # --> MIXED empty. # rpl_mixing_engines.inc [commands=eT] -b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (7, 1); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> eT << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> eT << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=Te] -b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id) VALUES (12, 1), (7, 1); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> Te << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=Te-trig] -b-b-b-b-b-b-b-b-b-b-b- >> Te-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_5(trans_id, stmt_id) VALUES (13, 1), (10, 2); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> Te-trig << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te-trig << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=Te-func] -b-b-b-b-b-b-b-b-b-b-b- >> Te-func << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO tt_1(trans_id, stmt_id, info) VALUES (14, 1, ''), (7, 1, fc_i_tt_5_suc (14, 1)); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> Te-func << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> Te-func << -e-e-e-e-e-e-e-e-e-e-e- # #2) Generates in the binlog what follows: # --> STMT "B N C" entry, format S. # --> ROW "B N C" entry, format R. # --> MIXED "B N C" entry, format S. # rpl_mixing_engines.inc [commands=N] -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> N << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=N-trig] -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_5(trans_id, stmt_id) VALUES (16, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> N-trig << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-trig << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=N-func] -b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- SELECT fc_i_nt_5_suc (17, 1); fc_i_nt_5_suc (17, 1) fc_i_nt_5_suc Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> N-func << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-func << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=N-proc] -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- CALL pc_i_nt_5_suc (18, 1); Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> N-proc << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_5) master-bin.000001 # Table_map # # table_id: # (test.nt_6) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> N-proc << -e-e-e-e-e-e-e-e-e-e-e- # #2.e) Generates in the binlog what follows if a N-table is changed: # --> STMT "B N C" entry, format S. # --> ROW "B N C" entry, format R. # --> MIXED "B N C" entry, format S. # rpl_mixing_engines.inc [commands=eN] -b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_1(trans_id, stmt_id) VALUES (15, 1); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> eN << -b-b-b-b-b-b-b-b-b-b-b- Log_name Pos Event_type Server_id End_log_pos Info -e-e-e-e-e-e-e-e-e-e-e- >> eN << -e-e-e-e-e-e-e-e-e-e-e- rpl_mixing_engines.inc [commands=Ne] -b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- INSERT INTO nt_1(trans_id, stmt_id) VALUES (20, 1), (15, 1); Got one of the listed errors Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Gtid # # SET @@SESSION.GTID_NEXT= Gtid_set master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.nt_1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT -e-e-e-e-e-e-e-e-e-e-e- >> Ne << -e-e-e-e-e-e-e-e-e-e-e- -b-b-b-b-b-b-b-b-b-b-b- >> Ne << -b-b-b-b-b-b-b-b-b-b-b- Log_