mirror of
https://github.com/MariaDB/server.git
synced 2025-07-20 10:24:14 +03:00
Improve documentation of performance_schema tables by appending COLUMN comments to tables. Additionally improve test coverage and update corresponding tests.
79 lines
1.9 KiB
Plaintext
79 lines
1.9 KiB
Plaintext
# Tests for PERFORMANCE_SCHEMA
|
|
|
|
--source include/not_embedded.inc
|
|
--source include/have_perfschema.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists test.setup_actors;
|
|
--enable_warnings
|
|
|
|
# Save the setup
|
|
create table test.setup_actors as
|
|
select * from performance_schema.setup_actors;
|
|
truncate table performance_schema.setup_actors;
|
|
|
|
select * from performance_schema.setup_actors;
|
|
|
|
select * from performance_schema.setup_actors
|
|
where user = '%';
|
|
|
|
insert into performance_schema.setup_actors
|
|
set user='Joe', host='localhost';
|
|
|
|
insert into performance_schema.setup_actors
|
|
set user='Joe', host='%';
|
|
|
|
insert into performance_schema.setup_actors
|
|
set user='%', host='server1';
|
|
|
|
insert into performance_schema.setup_actors
|
|
set user='%', host='%';
|
|
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
|
|
--error ER_WRONG_PERFSCHEMA_USAGE
|
|
update performance_schema.setup_actors
|
|
set user='ILLEGAL';
|
|
|
|
--error ER_WRONG_PERFSCHEMA_USAGE
|
|
update performance_schema.setup_actors
|
|
set host='ILLEGAL';
|
|
|
|
--error ER_WRONG_PERFSCHEMA_USAGE
|
|
update performance_schema.setup_actors
|
|
set role='ILLEGAL';
|
|
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
|
|
delete from performance_schema.setup_actors
|
|
where user = 'Joe' and host = 'localhost';
|
|
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
|
|
delete from performance_schema.setup_actors;
|
|
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
|
|
LOCK TABLES performance_schema.setup_actors READ;
|
|
UNLOCK TABLES;
|
|
|
|
LOCK TABLES performance_schema.setup_actors WRITE;
|
|
UNLOCK TABLES;
|
|
|
|
# Restore the setup
|
|
truncate table performance_schema.setup_actors;
|
|
insert into performance_schema.setup_actors
|
|
select * from test.setup_actors;
|
|
drop table test.setup_actors;
|
|
|
|
--echo #
|
|
--echo # MDEV-25325 column_comment for performance_schema tables
|
|
--echo #
|
|
select column_name, column_comment
|
|
from information_schema.columns
|
|
where table_schema='performance_schema' and table_name='setup_actors';
|