diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/perfschema/t/start_server_off.test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/perfschema/t/start_server_off.test')
-rw-r--r-- | mysql-test/suite/perfschema/t/start_server_off.test | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/start_server_off.test b/mysql-test/suite/perfschema/t/start_server_off.test new file mode 100644 index 00000000..6fdc02ac --- /dev/null +++ b/mysql-test/suite/perfschema/t/start_server_off.test @@ -0,0 +1,56 @@ +# Tests for PERFORMANCE_SCHEMA + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +--source ../include/start_server_common.inc + +select * from information_schema.engines + where engine = "PERFORMANCE_SCHEMA"; + +# Expecting all off / zero +show status like "performance_schema%"; +show variables like "performance_schema"; + +# Expect all consumers disabled + +select * from performance_schema.setup_consumers; + +# Expect no instruments + +select * from performance_schema.setup_instruments; + +select * from performance_schema.setup_actors; +select * from performance_schema.setup_objects; +select * from performance_schema.setup_timers; + +# Expect INSERT to fail with an error + +--error ER_WRONG_PERFSCHEMA_USAGE +insert into performance_schema.setup_objects values ('TABLE', 'myschema', 'myobject', 'YES', 'YES'); + +--error ER_WRONG_PERFSCHEMA_USAGE +insert into performance_schema.setup_actors values ('myhost', 'mysuser', 'myrole', 'YES', 'YES'); + +# Expect SELECT, UPDATE, DELETE and TRUNCATE to affect 0 rows, but with +# no error because the target row(s) will not be found + +select * from performance_schema.setup_objects; +update performance_schema.setup_objects set OBJECT_NAME = 'myobject'; +delete from performance_schema.setup_objects; + +select * from performance_schema.setup_actors; +update performance_schema.setup_actors set HOST = 'myhost'; +delete from performance_schema.setup_actors; + +truncate performance_schema.events_stages_history_long; +truncate performance_schema.events_statements_history_long; +truncate performance_schema.events_waits_history_long; +truncate performance_schema.setup_objects; +truncate performance_schema.setup_actors; + +--disable_warnings +# Expect that status variables are still accessible +show global status like "performance_schema%"; +show session status like "performance_schema%"; +--enable_warnings |