![]() |
MySQL
8.0.18
Source Code Documentation
|
#include <string>
#include <unordered_map>
#include <vector>
Go to the source code of this file.
Macros | |
#define | NUM_ACLS 31 |
#define | SELECT_ACL (1L << 0) |
#define | INSERT_ACL (1L << 1) |
#define | UPDATE_ACL (1L << 2) |
#define | DELETE_ACL (1L << 3) |
#define | CREATE_ACL (1L << 4) |
#define | DROP_ACL (1L << 5) |
#define | RELOAD_ACL (1L << 6) |
#define | SHUTDOWN_ACL (1L << 7) |
#define | PROCESS_ACL (1L << 8) |
#define | FILE_ACL (1L << 9) |
#define | GRANT_ACL (1L << 10) |
#define | REFERENCES_ACL (1L << 11) |
#define | INDEX_ACL (1L << 12) |
#define | ALTER_ACL (1L << 13) |
#define | SHOW_DB_ACL (1L << 14) |
#define | SUPER_ACL (1L << 15) |
#define | CREATE_TMP_ACL (1L << 16) |
#define | LOCK_TABLES_ACL (1L << 17) |
#define | EXECUTE_ACL (1L << 18) |
#define | REPL_SLAVE_ACL (1L << 19) |
#define | REPL_CLIENT_ACL (1L << 20) |
#define | CREATE_VIEW_ACL (1L << 21) |
#define | SHOW_VIEW_ACL (1L << 22) |
#define | CREATE_PROC_ACL (1L << 23) |
#define | ALTER_PROC_ACL (1L << 24) |
#define | CREATE_USER_ACL (1L << 25) |
#define | EVENT_ACL (1L << 26) |
#define | TRIGGER_ACL (1L << 27) |
#define | CREATE_TABLESPACE_ACL (1L << 28) |
#define | CREATE_ROLE_ACL (1L << 29) |
#define | DROP_ROLE_ACL (1L << 30) |
#define | NO_ACCESS (1L << 31) |
#define | DB_OP_ACLS |
Privileges to perform database related operations. More... | |
#define | TABLE_OP_ACLS |
Privileges to perform table related operations. More... | |
#define | PROC_OP_ACLS (ALTER_PROC_ACL | EXECUTE_ACL) |
Privileges to modify or execute stored procedures. More... | |
#define | DB_ACLS (DB_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users at DB-level. More... | |
#define | TABLE_ACLS (TABLE_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users at table-level. More... | |
#define | COL_ACLS (SELECT_ACL | INSERT_ACL | UPDATE_ACL | REFERENCES_ACL) |
Represents all privileges which could be granted to users at column-level. More... | |
#define | PROC_ACLS (PROC_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users for stored procedures. More... | |
#define | SHOW_PROC_ACLS (PROC_OP_ACLS | CREATE_PROC_ACL) |
Represents all privileges which are required to show the stored procedure. More... | |
#define | GLOBAL_ACLS |
Represents all privileges which could be granted to users globally. More... | |
#define | DEFAULT_CREATE_PROC_ACLS (ALTER_PROC_ACL | EXECUTE_ACL) |
#define | TMP_TABLE_ACLS |
Table-level privileges which are automatically "granted" to everyone on existing temporary tables (CREATE_ACL is necessary for ALTER ... More... | |
#define | DB_CHUNK0 (SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL | CREATE_ACL | DROP_ACL) |
#define | DB_CHUNK1 (GRANT_ACL | REFERENCES_ACL | INDEX_ACL | ALTER_ACL) |
#define | DB_CHUNK2 (CREATE_TMP_ACL | LOCK_TABLES_ACL) |
#define | DB_CHUNK3 (CREATE_VIEW_ACL | SHOW_VIEW_ACL | CREATE_PROC_ACL | ALTER_PROC_ACL) |
#define | DB_CHUNK4 (EXECUTE_ACL) |
#define | DB_CHUNK5 (EVENT_ACL | TRIGGER_ACL) |
#define | fix_rights_for_db(A) |
#define | get_rights_for_db(A) |
#define | TBL_CHUNK0 DB_CHUNK0 |
#define | TBL_CHUNK1 DB_CHUNK1 |
#define | TBL_CHUNK2 (CREATE_VIEW_ACL | SHOW_VIEW_ACL) |
#define | TBL_CHUNK3 TRIGGER_ACL |
#define | fix_rights_for_table(A) |
#define | get_rights_for_table(A) |
#define | fix_rights_for_column(A) (((A)&7) | (((A) & ~7) << 8)) |
#define | get_rights_for_column(A) (((A)&7) | ((A) >> 8)) |
#define | fix_rights_for_procedure(A) |
#define | get_rights_for_procedure(A) |
Variables | |
const std::vector< std::string > | global_acls_vector |
Consts for static privileges. More... | |
const std::unordered_map< std::string, int > | global_acls_map |
Bitmap offsets for static privileges. More... | |
#define ALTER_ACL (1L << 13) |
#define ALTER_PROC_ACL (1L << 24) |
#define COL_ACLS (SELECT_ACL | INSERT_ACL | UPDATE_ACL | REFERENCES_ACL) |
Represents all privileges which could be granted to users at column-level.
It essentially represents all the privileges present in the columns_priv table.
#define CREATE_ACL (1L << 4) |
#define CREATE_PROC_ACL (1L << 23) |
#define CREATE_ROLE_ACL (1L << 29) |
#define CREATE_TABLESPACE_ACL (1L << 28) |
#define CREATE_TMP_ACL (1L << 16) |
#define CREATE_USER_ACL (1L << 25) |
#define CREATE_VIEW_ACL (1L << 21) |
#define DB_ACLS (DB_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users at DB-level.
It essentially represents all the privileges present in the mysql.db table.
#define DB_CHUNK0 (SELECT_ACL | INSERT_ACL | UPDATE_ACL | DELETE_ACL | CREATE_ACL | DROP_ACL) |
#define DB_CHUNK1 (GRANT_ACL | REFERENCES_ACL | INDEX_ACL | ALTER_ACL) |
#define DB_CHUNK2 (CREATE_TMP_ACL | LOCK_TABLES_ACL) |
#define DB_CHUNK3 (CREATE_VIEW_ACL | SHOW_VIEW_ACL | CREATE_PROC_ACL | ALTER_PROC_ACL) |
#define DB_CHUNK4 (EXECUTE_ACL) |
#define DB_CHUNK5 (EVENT_ACL | TRIGGER_ACL) |
#define DB_OP_ACLS |
Privileges to perform database related operations.
Use this macro over DB_ACLS unless there is real need to use additional privileges present in the DB_ACLS
#define DEFAULT_CREATE_PROC_ACLS (ALTER_PROC_ACL | EXECUTE_ACL) |
#define DELETE_ACL (1L << 3) |
#define DROP_ACL (1L << 5) |
#define DROP_ROLE_ACL (1L << 30) |
#define EVENT_ACL (1L << 26) |
#define EXECUTE_ACL (1L << 18) |
#define FILE_ACL (1L << 9) |
#define fix_rights_for_column | ( | A | ) | (((A)&7) | (((A) & ~7) << 8)) |
#define fix_rights_for_db | ( | A | ) |
#define fix_rights_for_procedure | ( | A | ) |
#define fix_rights_for_table | ( | A | ) |
#define get_rights_for_column | ( | A | ) | (((A)&7) | ((A) >> 8)) |
#define get_rights_for_db | ( | A | ) |
#define get_rights_for_procedure | ( | A | ) |
#define get_rights_for_table | ( | A | ) |
#define GLOBAL_ACLS |
Represents all privileges which could be granted to users globally.
It essentially represents all the privileges present in the mysql.user table
#define GRANT_ACL (1L << 10) |
#define INDEX_ACL (1L << 12) |
#define INSERT_ACL (1L << 1) |
#define LOCK_TABLES_ACL (1L << 17) |
#define NO_ACCESS (1L << 31) |
#define NUM_ACLS 31 |
#define PROC_ACLS (PROC_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users for stored procedures.
It essentially represents all the privileges present in the mysql.procs_priv table.
#define PROC_OP_ACLS (ALTER_PROC_ACL | EXECUTE_ACL) |
Privileges to modify or execute stored procedures.
Use this macro over PROC_ACLS unless there is real need to use additional privileges present in the PROC_ACLS
#define PROCESS_ACL (1L << 8) |
#define REFERENCES_ACL (1L << 11) |
#define RELOAD_ACL (1L << 6) |
#define REPL_CLIENT_ACL (1L << 20) |
#define REPL_SLAVE_ACL (1L << 19) |
#define SELECT_ACL (1L << 0) |
#define SHOW_DB_ACL (1L << 14) |
#define SHOW_PROC_ACLS (PROC_OP_ACLS | CREATE_PROC_ACL) |
Represents all privileges which are required to show the stored procedure.
#define SHOW_VIEW_ACL (1L << 22) |
#define SHUTDOWN_ACL (1L << 7) |
#define SUPER_ACL (1L << 15) |
#define TABLE_ACLS (TABLE_OP_ACLS | GRANT_ACL) |
Represents all privileges which could be granted to users at table-level.
It essentially represents all the privileges present in the mysql.tables_priv table.
#define TABLE_OP_ACLS |
Privileges to perform table related operations.
Use this macro over TABLE_ACLS unless there is real need to use additional privileges present in the DB_ACLS
#define TBL_CHUNK0 DB_CHUNK0 |
#define TBL_CHUNK1 DB_CHUNK1 |
#define TBL_CHUNK2 (CREATE_VIEW_ACL | SHOW_VIEW_ACL) |
#define TBL_CHUNK3 TRIGGER_ACL |
#define TMP_TABLE_ACLS |
Table-level privileges which are automatically "granted" to everyone on existing temporary tables (CREATE_ACL is necessary for ALTER ...
RENAME).
#define TRIGGER_ACL (1L << 27) |
#define UPDATE_ACL (1L << 2) |
const std::unordered_map<std::string, int> global_acls_map |
Bitmap offsets for static privileges.
const std::vector<std::string> global_acls_vector |
Consts for static privileges.