summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r/aggregate.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/r/aggregate.result')
-rw-r--r--mysql-test/suite/perfschema/r/aggregate.result102
1 files changed, 102 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/aggregate.result b/mysql-test/suite/perfschema/r/aggregate.result
new file mode 100644
index 00000000000..edc7ce0bcca
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/aggregate.result
@@ -0,0 +1,102 @@
+"General cleanup"
+drop table if exists t1;
+update performance_schema.setup_instruments set enabled = 'NO';
+update performance_schema.setup_consumers set enabled = 'NO';
+truncate table performance_schema.file_summary_by_event_name;
+truncate table performance_schema.file_summary_by_instance;
+truncate table performance_schema.events_waits_summary_global_by_event_name;
+truncate table performance_schema.events_waits_summary_by_instance;
+truncate table performance_schema.events_waits_summary_by_thread_by_event_name;
+update performance_schema.setup_consumers set enabled = 'YES';
+update performance_schema.setup_instruments
+set enabled = 'YES', timed = 'YES';
+create table t1 (
+id INT PRIMARY KEY,
+b CHAR(100) DEFAULT 'initial value')
+ENGINE=MyISAM;
+insert into t1 (id) values (1), (2), (3), (4), (5), (6), (7), (8);
+update performance_schema.setup_instruments SET enabled = 'NO';
+update performance_schema.setup_consumers set enabled = 'NO';
+set @dump_all=FALSE;
+"Verifying file aggregate consistency"
+SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
+OR @dump_all;
+EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
+SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
+OR @dump_all;
+EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
+SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.SUM_NUMBER_OF_BYTES_READ <> SUM(i.SUM_NUMBER_OF_BYTES_READ))
+OR @dump_all;
+EVENT_NAME SUM_NUMBER_OF_BYTES_READ SUM(i.SUM_NUMBER_OF_BYTES_READ)
+SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_WRITE, SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
+FROM performance_schema.file_summary_by_event_name AS e
+JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.SUM_NUMBER_OF_BYTES_WRITE <> SUM(i.SUM_NUMBER_OF_BYTES_WRITE))
+OR @dump_all;
+EVENT_NAME SUM_NUMBER_OF_BYTES_WRITE SUM(i.SUM_NUMBER_OF_BYTES_WRITE)
+"Verifying waits aggregate consistency (instance)"
+SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(i.SUM_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.SUM_TIMER_WAIT < SUM(i.SUM_TIMER_WAIT))
+OR @dump_all;
+EVENT_NAME SUM_TIMER_WAIT SUM(i.SUM_TIMER_WAIT)
+SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(i.MIN_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.MIN_TIMER_WAIT > MIN(i.MIN_TIMER_WAIT))
+AND (MIN(i.MIN_TIMER_WAIT) != 0)
+OR @dump_all;
+EVENT_NAME MIN_TIMER_WAIT MIN(i.MIN_TIMER_WAIT)
+SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(i.MAX_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.MAX_TIMER_WAIT < MAX(i.MAX_TIMER_WAIT))
+OR @dump_all;
+EVENT_NAME MAX_TIMER_WAIT MAX(i.MAX_TIMER_WAIT)
+"Verifying waits aggregate consistency (thread)"
+SELECT EVENT_NAME, e.SUM_TIMER_WAIT, SUM(t.SUM_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
+USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.SUM_TIMER_WAIT < SUM(t.SUM_TIMER_WAIT))
+OR @dump_all;
+EVENT_NAME SUM_TIMER_WAIT SUM(t.SUM_TIMER_WAIT)
+SELECT EVENT_NAME, e.MIN_TIMER_WAIT, MIN(t.MIN_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
+USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.MIN_TIMER_WAIT > MIN(t.MIN_TIMER_WAIT))
+AND (MIN(t.MIN_TIMER_WAIT) != 0)
+OR @dump_all;
+EVENT_NAME MIN_TIMER_WAIT MIN(t.MIN_TIMER_WAIT)
+SELECT EVENT_NAME, e.MAX_TIMER_WAIT, MAX(t.MAX_TIMER_WAIT)
+FROM performance_schema.events_waits_summary_global_by_event_name AS e
+JOIN performance_schema.events_waits_summary_by_thread_by_event_name AS t
+USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.MAX_TIMER_WAIT < MAX(t.MAX_TIMER_WAIT))
+OR @dump_all;
+EVENT_NAME MAX_TIMER_WAIT MAX(t.MAX_TIMER_WAIT)
+update performance_schema.setup_consumers set enabled = 'YES';
+update performance_schema.setup_instruments
+set enabled = 'YES', timed = 'YES';
+drop table test.t1;