set binlog_format=statement; RESET MASTER; drop database if exists my_replicated_db; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); create database my_replicated_db; create table my_replicated_db.my_tx_table(a bigint) engine = innodb; create table my_replicated_db.my_non_tx_table(a bigint) engine = myisam; create table my_replicated_db.my_bh_table(a bigint) engine = blackhole; use test; drop table if exists marker_start; Warnings: Note 1051 Unknown table 'test.marker_start' use my_replicated_db; insert into my_tx_table(a) values (1000), (2000), (3000); insert into my_non_tx_table(a) values (1000), (2000), (3000); insert into my_bh_table(a) values (1000), (2000), (3000); use test; drop table if exists marker_insert_select; Warnings: Note 1051 Unknown table 'test.marker_insert_select' use my_replicated_db; insert into my_tx_table(a) select thread_id from performance_schema.threads; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select thread_id from performance_schema.threads; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select thread_id from performance_schema.threads; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_tx_table(a) select id from information_schema.processlist; insert into my_non_tx_table(a) select id from information_schema.processlist; insert into my_bh_table(a) select id from information_schema.processlist; insert into my_tx_table(a) select thread_id from mysql.general_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select thread_id from mysql.general_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select thread_id from mysql.general_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_tx_table(a) select thread_id from mysql.slow_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select thread_id from mysql.slow_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select thread_id from mysql.slow_log; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_tx_table(a) select Relay_log_pos from mysql.slave_relay_log_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select Relay_log_pos from mysql.slave_relay_log_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select Relay_log_pos from mysql.slave_relay_log_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_tx_table(a) select Master_log_pos from mysql.slave_master_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select Master_log_pos from mysql.slave_master_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select Master_log_pos from mysql.slave_master_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_tx_table(a) select Relay_log_pos from mysql.slave_worker_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_non_tx_table(a) select Relay_log_pos from mysql.slave_worker_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. insert into my_bh_table(a) select Relay_log_pos from mysql.slave_worker_info; Warnings: Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. use test; drop table if exists marker_multi_update; Warnings: Note 1051 Unknown table 'test.marker_multi_update' use my_replicated_db; update my_tx_table, performance_schema.setup_instruments set my_tx_table.a = my_tx_table.a + 1, performance_schema.setup_instruments.timed= 'NO'; update my_non_tx_table, performance_schema.setup_instruments set my_non_tx_table.a = my_non_tx_table.a + 1, performance_schema.setup_instruments.timed= 'NO'; update my_bh_table, performance_schema.setup_instruments set my_bh_table.a = my_bh_table.a + 1, performance_schema.setup_instruments.timed= 'NO'; use test; drop table if exists marker_multi_delete; Warnings: Note 1051 Unknown table 'test.marker_multi_delete' use my_replicated_db; insert into performance_schema.setup_actors values ('FOO', 'FOO', 'FOO', 'YES', 'YES'); delete my_tx_table.*, performance_schema.setup_actors.* from my_tx_table, performance_schema.setup_actors where my_tx_table.a != 1000 or performance_schema.setup_actors.role='FOO'; insert into performance_schema.setup_actors values ('BAR', 'BAR', 'BAR', 'YES', 'YES'); delete my_non_tx_table.*, performance_schema.setup_actors.* from my_non_tx_table, performance_schema.setup_actors where my_non_tx_table.a != 1000 or performance_schema.setup_actors.role='BAR'; insert into performance_schema.setup_actors values ('BAZ', 'BAZ', 'BAZ', 'YES', 'YES'); delete my_bh_table.*, performance_schema.setup_actors.* from my_bh_table, performance_schema.setup_actors where my_bh_table.a != 1000 or performance_schema.setup_actors.role='BAZ'; use test; drop table if exists marker_end; Warnings: Note 1051 Unknown table 'test.marker_end' drop database my_replicated_db; include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info binlog.000001 # Query # # drop database if exists my_replicated_db binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_utf8mb4'Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT' COLLATE 'utf8mb4_0900_ai_ci')) binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # create database my_replicated_db binlog.000001 # Query # # use `test`; create table my_replicated_db.my_tx_table(a bigint) engine = innodb binlog.000001 # Query # # use `test`; create table my_replicated_db.my_non_tx_table(a bigint) engine = myisam binlog.000001 # Query # # use `test`; create table my_replicated_db.my_bh_table(a bigint) engine = blackhole binlog.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_start` /* generated by server */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) values (1000), (2000), (3000) binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) values (1000), (2000), (3000) binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) values (1000), (2000), (3000) binlog.000001 # Query # # COMMIT binlog.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_insert_select` /* generated by server */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select thread_id from performance_schema.threads binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select thread_id from performance_schema.threads binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select thread_id from performance_schema.threads binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select id from information_schema.processlist binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select id from information_schema.processlist binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select id from information_schema.processlist binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select thread_id from mysql.general_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select thread_id from mysql.general_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select thread_id from mysql.general_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select thread_id from mysql.slow_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select thread_id from mysql.slow_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select thread_id from mysql.slow_log binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select Relay_log_pos from mysql.slave_relay_log_info binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select Relay_log_pos from mysql.slave_relay_log_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select Relay_log_pos from mysql.slave_relay_log_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select Master_log_pos from mysql.slave_master_info binlog.000001 # Xid # # COMMIT /* XID */ binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select Master_log_pos from mysql.slave_master_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select Master_log_pos from mysql.slave_master_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_tx_table(a) select Relay_log_pos from mysql.slave_worker_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_non_tx_table(a) select Relay_log_pos from mysql.slave_worker_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # BEGIN binlog.000001 # Query # # use `my_replicated_db`; insert into my_bh_table(a) select Relay_log_pos from mysql.slave_worker_info binlog.000001 # Query # # COMMIT binlog.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_multi_update` /* generated by server */ binlog.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_multi_delete` /* generated by server */ binlog.000001 # Query # # use `test`; DROP TABLE IF EXISTS `marker_end` /* generated by server */ binlog.000001 # Query # # use `my_replicated_db`; DROP TABLE IF EXISTS `my_bh_table` /* generated by server */ binlog.000001 # Query # # use `my_replicated_db`; DROP TABLE IF EXISTS `my_non_tx_table` /* generated by server */ binlog.000001 # Query # # drop database my_replicated_db truncate table performance_schema.setup_actors; insert into performance_schema.setup_actors values ('%', '%', '%', 'YES', 'YES');