blob: a27a6df260629b940d8f0e56ced626f1b270c04b (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
##
## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
## Verify behavior for anonymous users and PROCESS_ACL.
##
SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
SET @@global.performance_schema_show_processlist = OFF;
SHOW GRANTS;
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SHOW PROCESSLIST;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
SET @@global.performance_schema_show_processlist = ON;
SHOW GRANTS;
Grants for @localhost
GRANT USAGE ON *.* TO ''@'localhost'
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SHOW PROCESSLIST;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
GRANT PROCESS ON *.* TO ''@'localhost';
SET @@global.performance_schema_show_processlist = OFF;
SHOW GRANTS;
Grants for @localhost
GRANT PROCESS ON *.* TO ''@'localhost'
SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
count(*) >= 2
1
SELECT count(*) >= 2 FROM performance_schema.processlist;
count(*) >= 2
1
SHOW PROCESSLIST;
SELECT "Previous statement is now completed." as status;
status
Previous statement is now completed.
SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
FROM performance_schema.events_statements_history
WHERE SQL_TEXT = "SHOW PROCESSLIST";
EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
statement/sql/show_processlist SHOW PROCESSLIST 0
TRUNCATE TABLE performance_schema.events_statements_history;
set @@global.performance_schema_show_processlist = ON;
SHOW GRANTS;
Grants for @localhost
GRANT PROCESS ON *.* TO ''@'localhost'
SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
count(*) >= 2
1
SELECT count(*) >= 2 FROM performance_schema.processlist;
count(*) >= 2
1
SHOW PROCESSLIST;
SELECT "Previous statement is now completed." as status;
status
Previous statement is now completed.
SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
FROM performance_schema.events_statements_history
WHERE SQL_TEXT = "SHOW PROCESSLIST";
EVENT_NAME SQL_TEXT ROWS_SENT >= 2
statement/sql/show_processlist SHOW PROCESSLIST 1
SET @@global.performance_schema_show_processlist = @save_processlist;
|