mirror of
https://github.com/MariaDB/server.git
synced 2025-02-05 13:22:17 +01:00
b79723ffe3
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()
23 lines
759 B
Text
23 lines
759 B
Text
create user a@localhost;
|
|
connect a,localhost,a;
|
|
select * from performance_schema.global_status where variable_name='b';
|
|
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
|