mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-35384 Table performance_schema.session_status and other two tables are not shown in information_schema.tables for normal users
get_all_tables() skipped tables if the user has no privileges on the schema itself and no granted privilege on any tables in the schema. that is, it was skipping performance_schema tables (privileges on them aren't explicitly granted, but internally hard-coded) To fix: * extend ACL_internal_table_access::check() method with `bool any_combination_will_do` * fix all perfschema privilege checks to take it into account. * don't reuse table_acl_check object for all tables, initialize it for every table otherwise GRANT_INTERNAL_INFO will leak * remove incorrect privilege check from get_all_tables()
This commit is contained in:
@@ -5,3 +5,19 @@ VARIABLE_NAME VARIABLE_VALUE
|
||||
connection default;
|
||||
disconnect a;
|
||||
drop user a@localhost;
|
||||
#
|
||||
# MDEV-35384 Table performance_schema.session_status and other two tables are not shown in information_schema.tables for normal users
|
||||
#
|
||||
create user foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
select table_schema,engine from information_schema.tables where table_name='session_status';
|
||||
table_schema engine
|
||||
information_schema MEMORY
|
||||
performance_schema PERFORMANCE_SCHEMA
|
||||
select count(*) > 0 as 'table is readable' from performance_schema.session_status;
|
||||
table is readable
|
||||
1
|
||||
connection default;
|
||||
disconnect foo;
|
||||
drop user foo@localhost;
|
||||
# End of 10.6 tests
|
||||
|
@@ -10,3 +10,16 @@ connection default;
|
||||
disconnect a;
|
||||
drop user a@localhost;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-35384 Table performance_schema.session_status and other two tables are not shown in information_schema.tables for normal users
|
||||
--echo #
|
||||
create user foo@localhost;
|
||||
connect foo,localhost,foo;
|
||||
sorted_result;
|
||||
select table_schema,engine from information_schema.tables where table_name='session_status';
|
||||
select count(*) > 0 as 'table is readable' from performance_schema.session_status;
|
||||
connection default;
|
||||
disconnect foo;
|
||||
drop user foo@localhost;
|
||||
|
||||
--echo # End of 10.6 tests
|
||||
|
Reference in New Issue
Block a user