1# Tests for PERFORMANCE_SCHEMA table io
2#       Reveal that in case of DML on an updatable view the
3#       base table used within the view shows up whereas
4#       the view itself never shows up.
5
6--source include/not_embedded.inc
7--source include/have_perfschema.inc
8--source ../include/table_io_setup_helper.inc
9
10let $engine_type= MyISAM;
11let $table_item= test.v1;
12
13--disable_warnings
14eval drop view if exists $table_item;
15drop table if exists test.no_index_tab;
16--enable_warnings
17
18
19# Start recording events
20update performance_schema.setup_consumers set enabled='YES';
21insert into marker set a = 1;
22eval create table test.no_index_tab
23( a varchar(255) not null, b int not null) engine = $engine_type;
24insert into marker set a = 1;
25# Make sure the proper engine is used
26show create table test.no_index_tab;
27insert into marker set a = 1;
28eval create view $table_item as select * from test.no_index_tab;
29--source ../include/table_io_basic_dml.inc
30eval drop view $table_item;
31insert into marker set a = 1;
32drop table test.no_index_tab;
33
34# Stop recording events + pull result
35--source ../include/table_io_result_helper.inc
36
37# Cleanup
38--source ../include/table_io_cleanup_helper.inc
39
40