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/dml_threads.test | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.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/dml_threads.test')
-rw-r--r-- | mysql-test/suite/perfschema/t/dml_threads.test | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/dml_threads.test b/mysql-test/suite/perfschema/t/dml_threads.test new file mode 100644 index 00000000..328f6a6d --- /dev/null +++ b/mysql-test/suite/perfschema/t/dml_threads.test @@ -0,0 +1,50 @@ +# Tests for PERFORMANCE_SCHEMA + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +--disable_result_log +select * from performance_schema.threads + where name like 'Thread/%' limit 1; + +select * from performance_schema.threads + where name='FOO'; +--enable_result_log + +--error ER_TABLEACCESS_DENIED_ERROR +insert into performance_schema.threads + set name='FOO', thread_id=1, processlist_id=2; + +--error ER_WRONG_PERFSCHEMA_USAGE +update performance_schema.threads + set thread_id=12; + +--error ER_WRONG_PERFSCHEMA_USAGE +update performance_schema.threads + set thread_id=12 where PROCESSLIST_ID=connection_id(); + +update performance_schema.threads + set instrumented= 'NO' where PROCESSLIST_ID=connection_id(); + +select instrumented from performance_schema.threads + where PROCESSLIST_ID=connection_id(); + +update performance_schema.threads + set instrumented= 'YES' where PROCESSLIST_ID=connection_id(); + +select instrumented from performance_schema.threads + where PROCESSLIST_ID=connection_id(); + +--error ER_TABLEACCESS_DENIED_ERROR +delete from performance_schema.threads + where id=1; + +--error ER_TABLEACCESS_DENIED_ERROR +delete from performance_schema.threads; + +LOCK TABLES performance_schema.threads READ; +UNLOCK TABLES; + +LOCK TABLES performance_schema.threads WRITE; +UNLOCK TABLES; + |