| 1 |
set binlog_format=statement; |
| 2 |
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 3 |
RESET MASTER; |
| 4 |
select count(*) > 0 from performance_schema.setup_instruments; |
| 5 |
count(*) > 0 |
| 6 |
1 |
| 7 |
update performance_schema.setup_instruments set enabled='NO' |
| 8 |
where name like "wait/synch/rwlock/sql/%" |
| 9 |
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); |
| 10 |
select count(*) > 0 from performance_schema.events_waits_current; |
| 11 |
count(*) > 0 |
| 12 |
1 |
| 13 |
drop table if exists test.t1; |
| 14 |
drop table if exists test.t2; |
| 15 |
create table test.t1 (thread_id integer); |
| 16 |
create table test.t2 (name varchar(128)); |
| 17 |
insert into test.t1 |
| 18 |
select thread_id from performance_schema.events_waits_current; |
| 19 |
Warnings: |
| 20 |
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 |
| 21 |
insert into test.t2 |
| 22 |
select name from performance_schema.setup_instruments |
| 23 |
where name like "wait/synch/rwlock/sql/%" |
| 24 |
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); |
| 25 |
Warnings: |
| 26 |
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 |
| 27 |
drop table test.t1; |
| 28 |
drop table test.t2; |
| 29 |
update performance_schema.setup_instruments set enabled='YES' |
| 30 |
where name like "wait/synch/rwlock/sql/%" |
| 31 |
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock"); |
| 32 |
include/show_binlog_events.inc |
| 33 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 34 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 35 |
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ |
| 36 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 37 |
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */ |
| 38 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 39 |
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer) |
| 40 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 41 |
master-bin.000001 # Query # # use `test`; create table test.t2 (name varchar(128)) |
| 42 |
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
| 43 |
master-bin.000001 # Query # # use `test`; insert into test.t1 |
| 44 |
select thread_id from performance_schema.events_waits_current |
| 45 |
master-bin.000001 # Query # # COMMIT |
| 46 |
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
| 47 |
master-bin.000001 # Query # # use `test`; insert into test.t2 |
| 48 |
select name from performance_schema.setup_instruments |
| 49 |
where name like "wait/synch/rwlock/sql/%" |
| 50 |
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock") |
| 51 |
master-bin.000001 # Query # # COMMIT |
| 52 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 53 |
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
| 54 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 55 |
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ |