summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/include/table_io_result_helper.inc
blob: 4732806488e414fbd89c0c8826b6e23a7b8adb87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# See related script table_io_setup_helper.inc

# Stop table io recording
update performance_schema.setup_consumers set enabled='NO';
eval select event_name,
  left(source, locate(":", source)) as short_source,
  object_type, object_schema,
  if (locate("#sql-", object_name), "#sql-XXXX", object_name)
    as pretty_name,
  operation, number_of_bytes
  from performance_schema.events_waits_history_long
  where event_name like 'wait/io/table/%'
  and object_schema in ($schema_to_dump)
  order by thread_id, event_id;

# In case of failures, this will tell if table io are lost.
show status where Variable_name like 'performance_schema_%' and
                  Variable_name not like 'performance_schema_%_classes_lost';

# Cleanup
truncate performance_schema.events_waits_history_long;
flush status;