// conf files used for tests [root@cluster-repo mysql-advanced-5.6.22]# more master.cnf slave.cnf :::::::::::::: master.cnf :::::::::::::: [mysqld] user = root pid-file = /tmp/74233M/74233M.pid socket = /tmp/74233M/74233M.sock port = 3306 basedir = /data/ushastry/server/mysql-advanced-5.6.22 datadir = /tmp/74233M tmpdir = /tmp log-bin = master-bin log-bin-index = master-bin.index server-id = 1 binlog_format=MIXED :::::::::::::: slave.cnf :::::::::::::: [mysqld] user = root pid-file = /tmp/74233S/74233S.pid socket = /tmp/74233S/74233S.sock port = 3307 basedir = /data/ushastry/server/mysql-advanced-5.6.22 datadir = /tmp/74233S tmpdir = /tmp relay-log-index = slave-relay-bin.index relay-log = slave-relay-bin server-id = 2 log_slow_slave_statements=ON slow_query_log=ON long_query_time=0 // How to repeat - Setup simple replication(master, slave) - On master, run the statements provided by reporter(ensure DELETE statement is not missed) - On slave, examine the slow query log and confirm that RBR event is not present(other than empty BEGIN;) // master master> select @@version,@@version_comment; +-------------------------------------------+---------------------------------------------------------+ | @@version | @@version_comment | +-------------------------------------------+---------------------------------------------------------+ | 5.6.22-enterprise-commercial-advanced-log | MySQL Enterprise Server - Advanced Edition (Commercial) | +-------------------------------------------+---------------------------------------------------------+ master> select @@binlog_format; +-----------------+ | @@binlog_format | +-----------------+ | MIXED | +-----------------+ // Slave slave> show variables like '%slow%'; +---------------------------+-----------------------------------+ | Variable_name | Value | +---------------------------+-----------------------------------+ | log_slow_admin_statements | OFF | | log_slow_slave_statements | ON | | slow_launch_time | 2 | | slow_query_log | ON | | slow_query_log_file | /tmp/74233S/cluster-repo-slow.log | +---------------------------+-----------------------------------+ slave> select @@long_query_time; +-------------------+ | @@long_query_time | +-------------------+ | 0.000000 | +-------------------+ // Master master> use test Database changed master> master> create table test.t1 (id int auto_increment primary key); Query OK, 0 rows affected (0.05 sec) master> insert into test.t1 values (1); Query OK, 1 row affected (0.00 sec) master> insert into test.t1 values (2); Query OK, 1 row affected (0.00 sec) master> delete from test.t1 limit 1; Query OK, 1 row affected (0.01 sec) master> insert into test.t1 values (3); Query OK, 1 row affected (0.01 sec) master> master> show binlog events in 'master-bin.000003'; +-------------------+------+-------------+-----------+-------------+---------------------------------------------------------------------------------------------------------------+ | Log_name | Pos | Event_type | Server_id | End_log_pos | Info | +-------------------+------+-------------+-----------+-------------+---------------------------------------------------------------------------------------------------------------+ | master-bin.000003 | 4 | Format_desc | 1 | 120 | Server ver: 5.6.22-enterprise-commercial-advanced-log, Binlog ver: 4 | .. .. . | master-bin.000003 | 1144 | Query | 1 | 1274 | use `test`; create table test.t1 (id int auto_increment primary key) | | master-bin.000003 | 1274 | Query | 1 | 1353 | BEGIN | | master-bin.000003 | 1353 | Query | 1 | 1457 | use `test`; insert into test.t1 values (1) | | master-bin.000003 | 1457 | Xid | 1 | 1488 | COMMIT /* xid=34 */ | | master-bin.000003 | 1488 | Query | 1 | 1567 | BEGIN | | master-bin.000003 | 1567 | Query | 1 | 1671 | use `test`; insert into test.t1 values (2) | | master-bin.000003 | 1671 | Xid | 1 | 1702 | COMMIT /* xid=35 */ | | master-bin.000003 | 1702 | Query | 1 | 1774 | BEGIN | | master-bin.000003 | 1774 | Table_map | 1 | 1819 | table_id: 70 (test.t1) | | master-bin.000003 | 1819 | Delete_rows | 1 | 1859 | table_id: 70 flags: STMT_END_F | | master-bin.000003 | 1859 | Xid | 1 | 1890 | COMMIT /* xid=36 */ | | master-bin.000003 | 1890 | Query | 1 | 1969 | BEGIN | | master-bin.000003 | 1969 | Query | 1 | 2073 | use `test`; insert into test.t1 values (3) | | master-bin.000003 | 2073 | Xid | 1 | 2104 | COMMIT /* xid=37 */ | +-------------------+------+-------------+-----------+-------------+---------------------------------------------------------------------------------------------------------------+ 22 rows in set (0.00 sec) // Slave slave> \! more /tmp/74233S/cluster-repo-slow.log /data/ushastry/server/mysql-advanced-5.6.22/bin/mysqld, Version: 5.6.22-enterprise-commercial-advanced-log (MySQL Enterprise Server - Advanced Edition (Commercial)). started with: Tcp port: 3307 Unix socket: /tmp/74233S/74233S.sock Time Id Command Argument # Time: 141009 8:06:40 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.000728 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0 SET timestamp=1412822200; select @@version_comment limit 1; # Time: 141009 8:11:00 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.034430 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822460; CHANGE MASTER TO MASTER_HOST = '127.0.0.1' MASTER_USER = 'repl' MASTER_PASSWORD = MASTER_PORT = 3306 MASTER_LOG_FILE = 'master-bin.000003' MASTER_LOG_POS = 1144; # Time: 141009 8:11:03 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.014261 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822463; start slave; # Time: 141009 8:11:07 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.000176 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822467; show slave status; # Time: 141009 8:12:11 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.000912 Lock_time: 0.000229 Rows_sent: 5 Rows_examined: 5 SET timestamp=1412822531; show variables like '%slow%'; # Time: 141009 8:12:24 # User@Host: root[root] @ localhost [] Id: 1 # Query_time: 0.000113 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0 SET timestamp=1412822544; select @@long_query_time; # Time: 141009 8:12:39 # User@Host: [] @ [] Id: 3 # Query_time: 0.037371 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 use test; SET timestamp=1412822559; create table test.t1 (id int auto_increment primary key); # Time: 141009 8:12:48 # User@Host: [] @ [] Id: 3 # Query_time: 0.000018 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822568; BEGIN; # User@Host: [] @ [] Id: 3 # Query_time: 0.000422 Lock_time: 0.000306 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822568; insert into test.t1 values (1); # Time: 141009 8:12:55 # User@Host: [] @ [] Id: 3 # Query_time: 0.000018 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822575; BEGIN; # User@Host: [] @ [] Id: 3 # Query_time: 0.000131 Lock_time: 0.000036 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822575; insert into test.t1 values (2); # Time: 141009 8:13:02 # User@Host: [] @ [] Id: 3 # Query_time: 0.000020 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822582; BEGIN; # Time: 141009 8:13:09 # User@Host: [] @ [] Id: 3 # Query_time: 0.000018 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822589; BEGIN; # User@Host: [] @ [] Id: 3 # Query_time: 0.000128 Lock_time: 0.000036 Rows_sent: 0 Rows_examined: 0 SET timestamp=1412822589; insert into test.t1 values (3);