summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema/t/rpl_gtid_func.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/perfschema/t/rpl_gtid_func.test
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/perfschema/t/rpl_gtid_func.test')
-rw-r--r--mysql-test/suite/perfschema/t/rpl_gtid_func.test86
1 files changed, 86 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/rpl_gtid_func.test b/mysql-test/suite/perfschema/t/rpl_gtid_func.test
new file mode 100644
index 00000000..ffa58b27
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/rpl_gtid_func.test
@@ -0,0 +1,86 @@
+--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;
+
+--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;
+
+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/%";
+
+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;
+
+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;
+delete from performance_schema.setup_objects
+ where object_schema='master';
+sync_slave_with_master;
+
+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