1# Tests for PERFORMANCE_SCHEMA table io
2
3--source include/not_embedded.inc
4--source include/have_perfschema.inc
5--source ../include/table_io_setup_helper.inc
6
7let $engine_type= MyISAM;
8let $table_item= test.no_index_tab;
9
10--disable_warnings
11eval drop table if exists $table_item;
12drop table if exists test.no_index_tab_1;
13drop table if exists test.no_index_tab_2;
14--enable_warnings
15
16# Start recording events
17update performance_schema.setup_consumers set enabled='YES';
18insert into marker set a = 1;
19eval create table test.no_index_tab_1
20( a varchar(255) not null, b int not null) engine = $engine_type;
21insert into marker set a = 1;
22create table test.no_index_tab_2 like test.no_index_tab_1;
23insert into marker set a = 1;
24eval create table $table_item
25  ( a varchar(255) not null, b int not null) engine = merge
26  union = (test.no_index_tab_1,test.no_index_tab_2) insert_method = first;
27insert into marker set a = 1;
28# Make sure the proper engine is used
29show create table test.no_index_tab_1;
30insert into marker set a = 1;
31show create table test.no_index_tab_2;
32insert into marker set a = 1;
33eval show create table $table_item;
34--source ../include/table_io_basic_dml.inc
35drop table test.no_index_tab_1;
36insert into marker set a = 1;
37drop table test.no_index_tab_2;
38insert into marker set a = 1;
39eval drop table $table_item;
40
41# Stop recording events + pull result
42--source ../include/table_io_result_helper.inc
43
44# Cleanup
45--source ../include/table_io_cleanup_helper.inc
46
47