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