1 # Performance schema test template
3 # How to use this script in a test case
4 # =====================================
6 # The general table io test template is as follows
8 # --source include/not_embedded.inc
9 # --source include/have_perfschema.inc
10 # --source ../include/table_io_setup_helper.inc
11 # ... more setup scripts as needed ...
12 # update performance_schema.setup_consumers set enabled='YES';
13 # ... test payload here ...
14 # ... optionally, add this insert between statements
15 # ... to make the final output more readable
16 # insert into test.marker set a=1;
17 # ... more test payload here ...
18 # ... optionaly, add the following line (by default, only "test" is dumped) ...
19 # let $schema_to_dump="db1", "db2", "db3";
20 # --source ../include/table_io_result_helper.inc
21 # Optional: Repeat several times
22 # update performance_schema.setup_consumers set enabled='YES';
23 # ... test payload here ...
24 # --source ../include/table_io_result_helper.inc
26 # --source ../include/table_io_cleanup_helper.inc
36 # To be used in the test payload,
37 # insert into marker makes the test output easier to read,
38 # to separate table io events between statements.
41 update performance_schema.setup_consumers
set enabled=
'NO';
43 update performance_schema.setup_instruments
set enabled=
'NO';
44 update performance_schema.setup_instruments
set enabled=
'YES'
45 where
name like
"wait/io/table/%";
47 truncate
table performance_schema.events_waits_history_long;
49 # Reset lost counters to a known state
52 # Make sure there is room to instrument tables from this test.
55 # By default, dump table io only for test.
56 # A test can overide this
57 let $schema_to_dump=
"test";