| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 
 | include/master-slave.inc
[connection master]
connection master;
drop table if exists test.marker;
create table test.marker(a int) engine=innodb;
insert into test.marker values (1);
select * from test.marker;
a
1
truncate table performance_schema.events_waits_history_long;
truncate table performance_schema.events_statements_summary_by_digest;
update performance_schema.setup_instruments
set enabled='YES', timed='YES';
connection slave;
truncate table performance_schema.events_waits_history_long;
truncate table performance_schema.events_statements_summary_by_digest;
update performance_schema.setup_instruments
set enabled='YES', timed='NO';
connection master;
select * from performance_schema.setup_instruments
where timed='NO' and name not like "memory/%";
NAME	ENABLED	TIMED
select "This better be in the master" as in_master_digest;
in_master_digest
This better be in the master
insert into performance_schema.setup_objects
values ('TABLE', 'master', 'foo', 'YES', 'YES');
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE	OBJECT_SCHEMA	OBJECT_NAME	ENABLED	TIMED
EVENT	%	%	YES	YES
EVENT	information_schema	%	NO	NO
EVENT	mysql	%	NO	NO
EVENT	performance_schema	%	NO	NO
FUNCTION	%	%	YES	YES
FUNCTION	information_schema	%	NO	NO
FUNCTION	mysql	%	NO	NO
FUNCTION	performance_schema	%	NO	NO
PROCEDURE	%	%	YES	YES
PROCEDURE	information_schema	%	NO	NO
PROCEDURE	mysql	%	NO	NO
PROCEDURE	performance_schema	%	NO	NO
TABLE	%	%	YES	YES
TABLE	information_schema	%	NO	NO
TABLE	master	foo	YES	YES
TABLE	mysql	%	NO	NO
TABLE	performance_schema	%	NO	NO
TRIGGER	%	%	YES	YES
TRIGGER	information_schema	%	NO	NO
TRIGGER	mysql	%	NO	NO
TRIGGER	performance_schema	%	NO	NO
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
digest_text	count_star
SELECT ? AS `in_master_digest` 	1
insert into test.marker values (2);
connection slave;
select * from test.marker;
a
1
2
select * from performance_schema.setup_instruments
where timed='YES';
NAME	ENABLED	TIMED
select "This better be in the slave" as in_slave_digest;
in_slave_digest
This better be in the slave
insert into performance_schema.setup_objects
values ('TABLE', 'slave', 'foo', 'YES', 'YES');
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE	OBJECT_SCHEMA	OBJECT_NAME	ENABLED	TIMED
EVENT	%	%	YES	YES
EVENT	information_schema	%	NO	NO
EVENT	mysql	%	NO	NO
EVENT	performance_schema	%	NO	NO
FUNCTION	%	%	YES	YES
FUNCTION	information_schema	%	NO	NO
FUNCTION	mysql	%	NO	NO
FUNCTION	performance_schema	%	NO	NO
PROCEDURE	%	%	YES	YES
PROCEDURE	information_schema	%	NO	NO
PROCEDURE	mysql	%	NO	NO
PROCEDURE	performance_schema	%	NO	NO
TABLE	%	%	YES	YES
TABLE	information_schema	%	NO	NO
TABLE	mysql	%	NO	NO
TABLE	performance_schema	%	NO	NO
TABLE	slave	foo	YES	YES
TRIGGER	%	%	YES	YES
TRIGGER	information_schema	%	NO	NO
TRIGGER	mysql	%	NO	NO
TRIGGER	performance_schema	%	NO	NO
select digest_text, count_star
from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
digest_text	count_star
SELECT ? AS `in_slave_digest` 	1
connection master;
delete from performance_schema.setup_objects
where object_schema='master';
connection slave;
delete from performance_schema.setup_objects
where object_schema='slave';
select * from performance_schema.setup_objects;
OBJECT_TYPE	OBJECT_SCHEMA	OBJECT_NAME	ENABLED	TIMED
EVENT	mysql	%	NO	NO
EVENT	performance_schema	%	NO	NO
EVENT	information_schema	%	NO	NO
EVENT	%	%	YES	YES
FUNCTION	mysql	%	NO	NO
FUNCTION	performance_schema	%	NO	NO
FUNCTION	information_schema	%	NO	NO
FUNCTION	%	%	YES	YES
PROCEDURE	mysql	%	NO	NO
PROCEDURE	performance_schema	%	NO	NO
PROCEDURE	information_schema	%	NO	NO
PROCEDURE	%	%	YES	YES
TABLE	mysql	%	NO	NO
TABLE	performance_schema	%	NO	NO
TABLE	information_schema	%	NO	NO
TABLE	%	%	YES	YES
TRIGGER	mysql	%	NO	NO
TRIGGER	performance_schema	%	NO	NO
TRIGGER	information_schema	%	NO	NO
TRIGGER	%	%	YES	YES
include/rpl_end.inc
 |