summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/t/rpl_gtid_func.test
blob: 6373d4284dc6e7ac279690585f646e40af4e32c9 (plain)
1
2
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
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/have_perfschema.inc
--source include/no_protocol.inc

-- source include/master-slave.inc

connection master;
--echo **** On Master ****

--disable_warnings
drop table if exists test.marker;
--enable_warnings

create table test.marker(a int) engine=innodb;
insert into test.marker values (1);
select * from test.marker;

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';

sync_slave_with_master;
--echo **** 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';

connection master;
--echo **** On Master ****

select * from performance_schema.setup_instruments
  where timed='NO';

select "This better be in the master" as in_master_digest;

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;

select digest_text, count_star
  from performance_schema.events_statements_summary_by_digest
  where digest_text like "%in_%_digest%";

insert into test.marker values (2);

sync_slave_with_master;
--echo **** On Slave ****

select * from test.marker;

select * from performance_schema.setup_instruments
  where timed='YES';

select "This better be in the slave" as in_slave_digest;

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;

select digest_text, count_star
  from performance_schema.events_statements_summary_by_digest
  where digest_text like "%in_%_digest%";

connection master;
--echo **** On Master ****
delete from performance_schema.setup_objects
  where object_schema='master';
sync_slave_with_master;
--echo **** On Slave ****

delete from performance_schema.setup_objects
  where object_schema='slave';
select * from performance_schema.setup_objects;

--disable_query_log
--disable_warnings
connection master;
drop table test.marker;
sync_slave_with_master;
--enable_warnings
--enable_query_log
--source include/rpl_end.inc