summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r/global_read_lock.result
blob: 7522cdcf79cabd2bba3c5bef4fe09714a4a65c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use performance_schema;
update performance_schema.setup_instruments set enabled='YES';
<<<<<<< HEAD
create user pfsuser@localhost;
=======
set @orig_sql_mode= @@sql_mode;
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
Warnings:
Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
>>>>>>> merge-perfschema-5.7
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
Warnings:
Warning	1287	Using GRANT for creating new user is deprecated and will be removed in future release. Create new user with CREATE USER statement.
set sql_mode= @orig_sql_mode;
Warnings:
Warning	3090	Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.
flush privileges;
connect  con1, localhost, pfsuser, , test;
lock tables performance_schema.setup_instruments read;
select * from performance_schema.setup_instruments;
unlock tables;
lock tables performance_schema.setup_instruments write;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
unlock tables;
connection default;
flush tables with read lock;
connection con1;
lock tables performance_schema.setup_instruments read;
select * from performance_schema.setup_instruments;
unlock tables;
lock tables performance_schema.setup_instruments write;
connection default;
select event_name,
left(source, locate(":", source)) as short_source,
if(timer_end IS NULL, NULL, "SET") as timer_end,
if(timer_wait IS NULL, NULL, "SET") as timer_wait,
operation
from performance_schema.events_waits_current
where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status";
event_name	short_source	timer_end	timer_wait	operation
wait/synch/cond/sql/MDL_context::COND_wait_status		SET	SET	timed_wait
unlock tables;
connection con1;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
unlock tables;
disconnect con1;
connection default;
drop user pfsuser@localhost;
flush privileges;