2014-05-06 23:22:16 +02:00
|
|
|
include/master-slave.inc
|
|
|
|
[connection master]
|
|
|
|
**** On 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';
|
|
|
|
**** On 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';
|
|
|
|
**** On Master ****
|
|
|
|
select * from performance_schema.setup_instruments
|
|
|
|
where timed='NO';
|
|
|
|
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
|
|
|
|
TABLE % % YES YES
|
|
|
|
TABLE information_schema % NO NO
|
|
|
|
TABLE master foo YES YES
|
|
|
|
TABLE mysql % NO NO
|
|
|
|
TABLE performance_schema % NO NO
|
|
|
|
select digest, digest_text, count_star
|
|
|
|
from performance_schema.events_statements_summary_by_digest
|
|
|
|
where digest_text like "%in_%_digest%";
|
|
|
|
digest digest_text count_star
|
2015-05-04 22:00:24 +02:00
|
|
|
f1cd3e758822a4ef0e1502ec30818476 SELECT ? AS in_master_digest 1
|
2014-05-06 23:22:16 +02:00
|
|
|
insert into test.marker values (2);
|
|
|
|
**** On 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
|
|
|
|
TABLE % % YES YES
|
|
|
|
TABLE information_schema % NO NO
|
|
|
|
TABLE mysql % NO NO
|
|
|
|
TABLE performance_schema % NO NO
|
|
|
|
TABLE slave foo YES YES
|
|
|
|
select digest, digest_text, count_star
|
|
|
|
from performance_schema.events_statements_summary_by_digest
|
|
|
|
where digest_text like "%in_%_digest%";
|
|
|
|
digest digest_text count_star
|
2015-05-04 22:00:24 +02:00
|
|
|
c1cef2eb67ca48bb5d81d2e5e68aaf35 SELECT ? AS in_slave_digest 1
|
2014-05-06 23:22:16 +02:00
|
|
|
**** On Master ****
|
|
|
|
delete from performance_schema.setup_objects
|
|
|
|
where object_schema='master';
|
|
|
|
**** On 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
|
|
|
|
TABLE mysql % NO NO
|
|
|
|
TABLE performance_schema % NO NO
|
|
|
|
TABLE information_schema % NO NO
|
|
|
|
TABLE % % YES YES
|
|
|
|
include/rpl_end.inc
|