2010-01-11 18:47:27 -07:00
|
|
|
# Tests for PERFORMANCE_SCHEMA
|
|
|
|
|
|
|
|
--source include/not_embedded.inc
|
|
|
|
--source include/have_perfschema.inc
|
|
|
|
|
|
|
|
# Several selects so the output is readable
|
|
|
|
|
|
|
|
# Note that TABLE_NAME is in uppercase is some platforms,
|
|
|
|
# and in lowercase in others.
|
2010-11-03 16:42:33 +01:00
|
|
|
# Using lower(TABLE_NAME) to have consistent results.
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select TABLE_SCHEMA, lower(TABLE_NAME), TABLE_CATALOG
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), TABLE_TYPE, ENGINE
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), VERSION, ROW_FORMAT
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2019-12-10 15:35:00 +01:00
|
|
|
# Query status and system variable tables separately because AVG_ROW_LENGTH
|
|
|
|
# depends upon which plugins are loaded at the time of the query.
|
|
|
|
#
|
|
|
|
# TABLE_ROWS is unpredictable with autoscaling buffers
|
|
|
|
select lower(TABLE_NAME), AVG_ROW_LENGTH
|
|
|
|
from information_schema.tables
|
|
|
|
where TABLE_SCHEMA='performance_schema' and
|
2020-02-15 18:25:57 +01:00
|
|
|
lower(TABLE_NAME) not regexp '^variables|variables$|^status|session_status|global_status'
|
|
|
|
order by table_name;
|
2019-12-10 15:35:00 +01:00
|
|
|
|
|
|
|
--replace_column 2 table_rows 3 avg_row_len
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2019-12-10 15:35:00 +01:00
|
|
|
where TABLE_SCHEMA='performance_schema' and
|
2020-02-15 18:25:57 +01:00
|
|
|
lower(TABLE_NAME) regexp '^variables|variables$|^status|session_status|global_status'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2019-12-10 15:35:00 +01:00
|
|
|
select lower(TABLE_NAME), CREATE_OPTIONS
|
|
|
|
from information_schema.tables
|
2020-02-15 18:25:57 +01:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|
2010-11-03 16:42:33 +01:00
|
|
|
select lower(TABLE_NAME), TABLE_COMMENT
|
2010-01-11 18:47:27 -07:00
|
|
|
from information_schema.tables
|
2017-10-31 13:00:20 +04:00
|
|
|
where TABLE_SCHEMA='performance_schema'
|
|
|
|
order by table_name;
|
2010-01-11 18:47:27 -07:00
|
|
|
|