summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/perfschema/t/dml_global_variables.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/perfschema/t/dml_global_variables.test
parentInitial commit. (diff)
downloadmariadb-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_global_variables.test')
-rw-r--r--mysql-test/suite/perfschema/t/dml_global_variables.test36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/t/dml_global_variables.test b/mysql-test/suite/perfschema/t/dml_global_variables.test
new file mode 100644
index 00000000..20507732
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_global_variables.test
@@ -0,0 +1,36 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+
+--disable_result_log
+select * from performance_schema.global_variables
+ where variable_name like 'autocommit%' limit 1;
+
+select * from performance_schema.global_variables
+ where variable_name='FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.global_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.global_variables
+ set variable_name='FOO', variable_value='BAR';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_variables
+ where variable_name <> 'FOO';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.global_variables;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_variables READ;
+UNLOCK TABLES;
+
+-- error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.global_variables WRITE;
+UNLOCK TABLES;
+