Bug #86464 INFORMATION_SCHEMA.TABLES missing performance_schema.session&global_variables
Submitted: 25 May 2017 18:12 Modified: 25 May 2017 22:06
Reporter: George Lorch Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.7/8.0 OS:Any
Assigned to: CPU Architecture:Any

[25 May 2017 18:12] George Lorch
Description:
When a user has restricted permissions, the performance_schema.session&global_variables tables do not appear in the INFORMATION_SCHEMA.TABLES table, even though the user can still fully access the performance_schema.session&global_variables table.

How to repeat:
Consider this user, database and table:

CREATE DATABASE dump;
CREATE USER 'dumper'@'localhost';
GRANT ALL ON dump.* TO 'dumper'@'localhost';

CREATE TABLE dump.t(a int primary key auto_increment);
INSERT INTO dump.t VALUES(NULL), (NULL), (NULL), (NULL);

Now, log in as the user 'dumper'@'localhost':
mysql> SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='performance_schema' AND TABLE_NAME='session_variables';
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

mysql> SELECT COUNT(*) FROM performance_schema.session_variables;
+----------+
| COUNT(*) |
+----------+
|      651 |
+----------+
1 row in set (0.00 sec)

Suggested fix:
Make the p_s tables properly visible to the user in I_S
[25 May 2017 22:06] MySQL Verification Team
Thank you for the bug report. Verified as described.