polardbxengine/mysql-test/suite/xengine_perfschema/t/dml_setup_threads.test

72 lines
1.7 KiB
Plaintext

# Tests for PERFORMANCE_SCHEMA
# The query result are not re producible,
# due to variations in platforms and plugins
# We still execute the select statement, for:
# - code coverage
# - make sure it does not crash
# - valgrind coverage
--disable_result_log
select * from performance_schema.setup_threads;
--enable_result_log
select * from performance_schema.setup_threads
order by name limit 10;
--disable_result_log
select * from performance_schema.setup_threads
where enabled='YES';
--enable_result_log
--error ER_TABLEACCESS_DENIED_ERROR
insert into performance_schema.setup_threads
set name='FOO', enabled='YES', history='YES';
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_threads
set name='FOO';
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_threads
set properties='user';
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_threads
set volatility=666;
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_threads
set documentation='Bar';
update performance_schema.setup_threads
set enabled='NO';
update performance_schema.setup_threads
set history='NO';
update performance_schema.setup_threads
set enabled='YES', history='YES';
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.setup_threads;
--error ER_TABLEACCESS_DENIED_ERROR
delete from performance_schema.setup_threads
where name like 'thread/%';
LOCK TABLES performance_schema.setup_threads READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_threads WRITE;
UNLOCK TABLES;
UPDATE performance_schema.setup_threads SET history='NO'
ORDER BY RAND();
# Test cleanup
update performance_schema.setup_threads
set enabled='YES', history='YES';