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