Debian Codegraph @

mysql-test/suite/perfschema/t/information_schema.test

raw
1 # Tests for PERFORMANCE_SCHEMA
2
3 --source include/not_embedded.inc
4 --source include/have_perfschema.inc
5
6 # Several selects so the output is readable
7
8 # Note that TABLE_NAME is in uppercase is some platforms,
9 # and in lowercase in others.
10 # Using lower(TABLE_NAME) to have consistent results.
11
12 select TABLE_SCHEMA, lower(TABLE_NAME), TABLE_CATALOG
13 from information_schema.tables
14 where TABLE_SCHEMA='performance_schema'
15 order by table_name;
16
17 select lower(TABLE_NAME), TABLE_TYPE, ENGINE
18 from information_schema.tables
19 where TABLE_SCHEMA='performance_schema'
20 order by table_name;
21
22 select lower(TABLE_NAME), VERSION, ROW_FORMAT
23 from information_schema.tables
24 where TABLE_SCHEMA='performance_schema'
25 order by table_name;
26
27 # Query status and system variable tables separately because AVG_ROW_LENGTH
28 # depends upon which plugins are loaded at the time of the query.
29 #
30 # TABLE_ROWS is unpredictable with autoscaling buffers
31 select lower(TABLE_NAME), AVG_ROW_LENGTH
32 from information_schema.tables
33 where TABLE_SCHEMA='performance_schema' and
34 lower(TABLE_NAME) not regexp '^variables|variables$|^status|session_status|global_status'
35 order by table_name;
36
37 --replace_column 2 table_rows 3 avg_row_len
38 select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
39 from information_schema.tables
40 where TABLE_SCHEMA='performance_schema' and
41 lower(TABLE_NAME) regexp '^variables|variables$|^status|session_status|global_status'
42 order by table_name;
43
44 select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
45 from information_schema.tables
46 where TABLE_SCHEMA='performance_schema'
47 order by table_name;
48
49 select lower(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
50 from information_schema.tables
51 where TABLE_SCHEMA='performance_schema'
52 order by table_name;
53
54 select lower(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
55 from information_schema.tables
56 where TABLE_SCHEMA='performance_schema'
57 order by table_name;
58
59 select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
60 from information_schema.tables
61 where TABLE_SCHEMA='performance_schema'
62 order by table_name;
63
64 select lower(TABLE_NAME), CREATE_OPTIONS
65 from information_schema.tables
66 where TABLE_SCHEMA='performance_schema'
67 order by table_name;
68
69 select lower(TABLE_NAME), TABLE_COMMENT
70 from information_schema.tables
71 where TABLE_SCHEMA='performance_schema'
72 order by table_name;
73