mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
Improve documentation of performance_schema tables by appending COLUMN comments to tables. Additionally improve test coverage and update corresponding tests.
70 lines
2.1 KiB
Text
70 lines
2.1 KiB
Text
drop table if exists test.setup_actors;
|
|
create table test.setup_actors as
|
|
select * from performance_schema.setup_actors;
|
|
truncate table performance_schema.setup_actors;
|
|
select * from performance_schema.setup_actors;
|
|
HOST USER ROLE
|
|
select * from performance_schema.setup_actors
|
|
where user = '%';
|
|
HOST USER ROLE
|
|
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;
|
|
HOST USER ROLE
|
|
% % %
|
|
server1 % %
|
|
% Joe %
|
|
localhost Joe %
|
|
update performance_schema.setup_actors
|
|
set user='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
update performance_schema.setup_actors
|
|
set host='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
update performance_schema.setup_actors
|
|
set role='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
HOST USER ROLE
|
|
% % %
|
|
server1 % %
|
|
% Joe %
|
|
localhost Joe %
|
|
delete from performance_schema.setup_actors
|
|
where user = 'Joe' and host = 'localhost';
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
HOST USER ROLE
|
|
% % %
|
|
server1 % %
|
|
% Joe %
|
|
delete from performance_schema.setup_actors;
|
|
select * from performance_schema.setup_actors
|
|
order by USER, HOST;
|
|
HOST USER ROLE
|
|
LOCK TABLES performance_schema.setup_actors READ;
|
|
UNLOCK TABLES;
|
|
LOCK TABLES performance_schema.setup_actors WRITE;
|
|
UNLOCK TABLES;
|
|
truncate table performance_schema.setup_actors;
|
|
insert into performance_schema.setup_actors
|
|
select * from test.setup_actors;
|
|
drop table test.setup_actors;
|
|
#
|
|
# MDEV-25325 column_comment for performance_schema tables
|
|
#
|
|
select column_name, column_comment
|
|
from information_schema.columns
|
|
where table_schema='performance_schema' and table_name='setup_actors';
|
|
column_name column_comment
|
|
HOST Host name, either a literal, or the % wildcard representing any host.
|
|
USER User name, either a literal or the % wildcard representing any name.
|
|
ROLE Unused
|