mirror of
https://github.com/MariaDB/server.git
synced 2025-08-17 21:39:33 +00:00
MDEV-24486 Add table_privileges
view to the sys
schema
The existing INFORMATION_SCHEMA.TABLE_PRIVILEGES displays only those privileges that were specifically granted on the table level, whereas it may be useful to see privileges granted at the database and global level. This commit adds a new view `table_privileges` to the `sys` schema for that purpose. The view shows privileges on existing tables and views, combining all possible levels: - user_privileges - schema_privileges - table_privileges
This commit is contained in:
@ -269,6 +269,11 @@ constexpr privilege_t PROC_DDL_ACLS=
|
||||
constexpr privilege_t SHOW_PROC_WITHOUT_DEFINITION_ACLS=
|
||||
PROC_DDL_ACLS | EXECUTE_ACL;
|
||||
|
||||
/*
|
||||
When changing this, don't forget to update tables_priv
|
||||
at scripts/mariadb_system_tables.sql, scripts/mariadb_system_tables_fix.sql
|
||||
and scripts/sys_schema/i_s/table_privileges.sql
|
||||
*/
|
||||
constexpr privilege_t TABLE_ACLS=
|
||||
COL_DML_ACLS | ALL_TABLE_DDL_ACLS | VIEW_ACLS |
|
||||
GRANT_ACL | REFERENCES_ACL |
|
||||
|
Reference in New Issue
Block a user