mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#57609 performance_schema does not work with lower_case_table_names
Before this fix, the performance schema tables were defined in UPPERCASE. This was incompatible with the lowercase_table_names option, and caused issues with the install / upgrade process, when changing the lower case table names setting *after* the install or upgrade. With this fix, all performance schema tables are exposed with lowercase names. As a result, the name of the performance schema table is always lowercase, no matter how / if / when the lowercase_table_names setting if changed.
This commit is contained in:
@ -3,26 +3,26 @@ Grants for root@localhost
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION
|
||||
GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION
|
||||
grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION;
|
||||
grant SELECT(thread_id, event_id) on performance_schema.EVENTS_WAITS_CURRENT
|
||||
grant SELECT(thread_id, event_id) on performance_schema.events_waits_current
|
||||
to 'pfs_user_5'@localhost;
|
||||
grant UPDATE(enabled) on performance_schema.SETUP_INSTRUMENTS
|
||||
grant UPDATE(enabled) on performance_schema.setup_instruments
|
||||
to 'pfs_user_5'@localhost;
|
||||
flush privileges;
|
||||
select thread_id from performance_schema.EVENTS_WAITS_CURRENT;
|
||||
select thread_id, event_id from performance_schema.EVENTS_WAITS_CURRENT;
|
||||
update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
|
||||
select event_name from performance_schema.EVENTS_WAITS_CURRENT;
|
||||
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
|
||||
select thread_id from performance_schema.events_waits_current;
|
||||
select thread_id, event_id from performance_schema.events_waits_current;
|
||||
update performance_schema.setup_instruments set enabled='YES';
|
||||
select event_name from performance_schema.events_waits_current;
|
||||
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current'
|
||||
select thread_id, event_id, event_name
|
||||
from performance_schema.EVENTS_WAITS_CURRENT;
|
||||
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'EVENTS_WAITS_CURRENT'
|
||||
update performance_schema.SETUP_INSTRUMENTS set name='illegal';
|
||||
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'SETUP_INSTRUMENTS'
|
||||
update performance_schema.SETUP_INSTRUMENTS set timed='NO';
|
||||
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'SETUP_INSTRUMENTS'
|
||||
from performance_schema.events_waits_current;
|
||||
ERROR 42000: SELECT command denied to user 'pfs_user_5'@'localhost' for column 'event_name' in table 'events_waits_current'
|
||||
update performance_schema.setup_instruments set name='illegal';
|
||||
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'setup_instruments'
|
||||
update performance_schema.setup_instruments set timed='NO';
|
||||
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'setup_instruments'
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
|
||||
DROP USER 'pfs_user_5'@localhost;
|
||||
flush privileges;
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES', timed = 'YES';
|
||||
UPDATE performance_schema.SETUP_CONSUMERS SET enabled = 'YES';
|
||||
UPDATE performance_schema.SETUP_TIMERS SET timer_name = 'CYCLE';
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
|
||||
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE';
|
||||
|
Reference in New Issue
Block a user