mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
84 lines
3.6 KiB
Text
84 lines
3.6 KiB
Text
drop table if exists test.setup_objects;
|
|
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
|
create table test.setup_objects as
|
|
select * from performance_schema.setup_objects;
|
|
truncate table performance_schema.setup_objects;
|
|
select * from performance_schema.setup_objects;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
select * from performance_schema.setup_objects
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
select * from performance_schema.setup_objects
|
|
where object_type = 'TABLE'
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
select * from performance_schema.setup_objects
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
set sql_mode= '';
|
|
insert into performance_schema.setup_objects
|
|
set object_type='ILLEGAL', object_schema='FOO', object_name='BAR',
|
|
enabled='YES', timed='YES';
|
|
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
|
|
set sql_mode= DEFAULT;
|
|
insert into performance_schema.setup_objects
|
|
set object_type='TABLE', object_schema='FOO', object_name='BAR',
|
|
enabled='YES', timed='YES';
|
|
insert into performance_schema.setup_objects
|
|
set object_type='TABLE', object_schema='FOO', object_name='BAR',
|
|
enabled='YES', timed='NO';
|
|
ERROR 23000: Can't write; duplicate key in table 'setup_objects'
|
|
delete from performance_schema.setup_objects
|
|
where object_type='TABLE' and object_schema='FOO';
|
|
select * from performance_schema.setup_objects
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
insert into performance_schema.setup_objects
|
|
set object_type='TABLE', object_schema='FOO', object_name='BAR',
|
|
enabled='NO', timed='YES';
|
|
select * from performance_schema.setup_objects
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
TABLE FOO BAR NO YES
|
|
set statement sql_mode = '' for
|
|
update performance_schema.setup_objects
|
|
set object_type='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
update performance_schema.setup_objects
|
|
set object_schema='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
update performance_schema.setup_objects
|
|
set object_name='ILLEGAL';
|
|
ERROR HY000: Invalid performance_schema usage
|
|
update performance_schema.setup_objects
|
|
set enabled='NO', timed='NO';
|
|
select * from performance_schema.setup_objects
|
|
order by object_type, object_schema, object_name;
|
|
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
|
|
TABLE FOO BAR NO NO
|
|
update performance_schema.setup_objects
|
|
set enabled='YES', timed='YES';
|
|
delete from performance_schema.setup_objects
|
|
where object_type = 'TABLE';
|
|
delete from performance_schema.setup_objects;
|
|
LOCK TABLES performance_schema.setup_objects READ;
|
|
UNLOCK TABLES;
|
|
LOCK TABLES performance_schema.setup_objects WRITE;
|
|
UNLOCK TABLES;
|
|
truncate table performance_schema.setup_objects;
|
|
insert into performance_schema.setup_objects
|
|
select * from test.setup_objects;
|
|
drop table test.setup_objects;
|
|
SET sql_mode = default;
|
|
#
|
|
# 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_objects';
|
|
column_name column_comment
|
|
OBJECT_TYPE Type of object to instrument.
|
|
OBJECT_SCHEMA Schema containing the object, either the literal or % for any schema.
|
|
OBJECT_NAME Name of the instrumented object, either the literal or % for any object.
|
|
ENABLED Whether the object's events are instrumented or not. Can be disabled, in which case monitoring is not enabled for those objects.
|
|
TIMED Whether the object's events are timed or not. Can be modified.
|