Debian Codegraph @

mysql-test/suite/perfschema/r/processlist_reg_user.result

raw
1 ##
2 ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
3 ## Verify behavior for regular users and PROCESS_ACL.
4 ##
5 SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
6 SET @@global.performance_schema_show_processlist = OFF;
7 Warnings:
8 Warning 4166 '@@performance_schema_show_processlist' is deprecated and will be removed in a future release. When it is removed, SHOW PROCESSLIST will always use the performance schema implementation.
9 CREATE USER 'regular'@'localhost';
10 SHOW GRANTS;
11 Grants for regular@localhost
12 GRANT USAGE ON *.* TO `regular`@`localhost`
13 SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
14 USER INFO
15 regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST
16 Warnings:
17 Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
18 SELECT USER, INFO FROM performance_schema.processlist;
19 USER INFO
20 regular SELECT USER, INFO FROM performance_schema.processlist
21 SHOW PROCESSLIST;
22 SELECT "Previous statement is now completed." as status;
23 status
24 Previous statement is now completed.
25 SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
26 FROM performance_schema.events_statements_history
27 WHERE SQL_TEXT = "SHOW PROCESSLIST";
28 EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
29 statement/sql/show_processlist SHOW PROCESSLIST 0
30 TRUNCATE TABLE performance_schema.events_statements_history;
31 SET @@global.performance_schema_show_processlist = ON;
32 Warnings:
33 Warning 4166 '@@performance_schema_show_processlist' is deprecated and will be removed in a future release. When it is removed, SHOW PROCESSLIST will always use the performance schema implementation.
34 SHOW GRANTS;
35 Grants for regular@localhost
36 GRANT USAGE ON *.* TO `regular`@`localhost`
37 SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
38 USER INFO
39 regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST
40 Warnings:
41 Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
42 SELECT USER, INFO FROM performance_schema.processlist;
43 USER INFO
44 regular SELECT USER, INFO FROM performance_schema.processlist
45 SHOW PROCESSLIST;
46 SELECT "Previous statement is now completed." as status;
47 status
48 Previous statement is now completed.
49 SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT
50 FROM performance_schema.events_statements_history
51 WHERE SQL_TEXT = "SHOW PROCESSLIST";
52 EVENT_NAME SQL_TEXT ROWS_SENT
53 statement/sql/show_processlist SHOW PROCESSLIST 1
54 TRUNCATE TABLE performance_schema.events_statements_history;
55 GRANT PROCESS ON *.* TO 'regular'@'localhost';
56 SET @@global.performance_schema_show_processlist = OFF;
57 Warnings:
58 Warning 4166 '@@performance_schema_show_processlist' is deprecated and will be removed in a future release. When it is removed, SHOW PROCESSLIST will always use the performance schema implementation.
59 SHOW GRANTS;
60 Grants for regular@localhost
61 GRANT PROCESS ON *.* TO `regular`@`localhost`
62 SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
63 count(*) >= 2
64 1
65 Warnings:
66 Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
67 SELECT count(*) >= 2 FROM performance_schema.processlist;
68 count(*) >= 2
69 1
70 SHOW PROCESSLIST;
71 SELECT "Previous statement is now completed." as status;
72 status
73 Previous statement is now completed.
74 SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
75 FROM performance_schema.events_statements_history
76 WHERE SQL_TEXT = "SHOW PROCESSLIST";
77 EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
78 statement/sql/show_processlist SHOW PROCESSLIST 0
79 TRUNCATE TABLE performance_schema.events_statements_history;
80 SET @@global.performance_schema_show_processlist = ON;
81 Warnings:
82 Warning 4166 '@@performance_schema_show_processlist' is deprecated and will be removed in a future release. When it is removed, SHOW PROCESSLIST will always use the performance schema implementation.
83 SHOW GRANTS;
84 Grants for regular@localhost
85 GRANT PROCESS ON *.* TO `regular`@`localhost`
86 SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
87 count(*) >= 2
88 1
89 Warnings:
90 Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
91 SELECT count(*) >= 2 FROM performance_schema.processlist;
92 count(*) >= 2
93 1
94 SHOW PROCESSLIST;
95 SELECT "Previous statement is now completed." as status;
96 status
97 Previous statement is now completed.
98 SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
99 FROM performance_schema.events_statements_history
100 WHERE SQL_TEXT = "SHOW PROCESSLIST";
101 EVENT_NAME SQL_TEXT ROWS_SENT >= 2
102 statement/sql/show_processlist SHOW PROCESSLIST 1
103 TRUNCATE TABLE performance_schema.events_statements_history;
104 SET @@global.performance_schema_show_processlist = @save_processlist;
105 Warnings:
106 Warning 4166 '@@performance_schema_show_processlist' is deprecated and will be removed in a future release. When it is removed, SHOW PROCESSLIST will always use the performance schema implementation.
107 DROP USER 'regular'@'localhost';