mirror of
https://github.com/MariaDB/server.git
synced 2025-02-10 23:45:34 +01:00
![Sergei Golubchik](/assets/img/avatar_default.png)
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()
25 lines
824 B
Text
25 lines
824 B
Text
--source include/not_embedded.inc
|
|
--source include/have_perfschema.inc
|
|
#
|
|
# MDEV-22884 Assertion `grant_table || grant_table_role' failed on perfschema
|
|
#
|
|
create user a@localhost;
|
|
connect a,localhost,a;
|
|
select * from performance_schema.global_status where variable_name='b';
|
|
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
|