dml_mutex_instances.test 909 Bytes
Newer Older
Marc Alff's avatar
Marc Alff committed
1 2 3 4 5
# Tests for PERFORMANCE_SCHEMA

--source include/not_embedded.inc
--source include/have_perfschema.inc

6
--disable_result_log
7
select * from performance_schema.mutex_instances limit 1;
Marc Alff's avatar
Marc Alff committed
8

9
select * from performance_schema.mutex_instances
Marc Alff's avatar
Marc Alff committed
10
  where name='FOO';
11
--enable_result_log
Marc Alff's avatar
Marc Alff committed
12 13

--error ER_TABLEACCESS_DENIED_ERROR
14
insert into performance_schema.mutex_instances
Marc Alff's avatar
Marc Alff committed
15 16 17
  set name='FOO', object_instance_begin=12;

--error ER_TABLEACCESS_DENIED_ERROR
18
update performance_schema.mutex_instances
Marc Alff's avatar
Marc Alff committed
19 20 21
  set name='FOO';

--error ER_TABLEACCESS_DENIED_ERROR
22
delete from performance_schema.mutex_instances
Marc Alff's avatar
Marc Alff committed
23 24 25
  where name like "wait/%";

--error ER_TABLEACCESS_DENIED_ERROR
26
delete from performance_schema.mutex_instances;
Marc Alff's avatar
Marc Alff committed
27 28

-- error ER_TABLEACCESS_DENIED_ERROR
29
LOCK TABLES performance_schema.mutex_instances READ;
Marc Alff's avatar
Marc Alff committed
30 31 32
UNLOCK TABLES;

-- error ER_TABLEACCESS_DENIED_ERROR
33
LOCK TABLES performance_schema.mutex_instances WRITE;
Marc Alff's avatar
Marc Alff committed
34 35
UNLOCK TABLES;