MySQL  8.0.21
Source Code Documentation
role_tables.cc File Reference
#include "sql/auth/role_tables.h"
#include <string.h>
#include <memory>
#include "../sql_update.h"
#include "lex_string.h"
#include "m_ctype.h"
#include "m_string.h"
#include "my_alloc.h"
#include "my_base.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_sys.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/mysql_lex_string.h"
#include "mysql/psi/psi_base.h"
#include "mysqld_error.h"
#include "sql/auth/auth_internal.h"
#include "sql/auth/sql_auth_cache.h"
#include "sql/auth/sql_user_table.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/key.h"
#include "sql/mdl.h"
#include "sql/mysqld.h"
#include "sql/records.h"
#include "sql/row_iterator.h"
#include "sql/sql_base.h"
#include "sql/sql_const.h"
#include "sql/table.h"
#include "sql_string.h"
#include "thr_lock.h"

Macros

#define MYSQL_ROLE_EDGES_FIELD_FROM_HOST   0
 
#define MYSQL_ROLE_EDGES_FIELD_FROM_USER   1
 
#define MYSQL_ROLE_EDGES_FIELD_TO_HOST   2
 
#define MYSQL_ROLE_EDGES_FIELD_TO_USER   3
 
#define MYSQL_ROLE_EDGES_FIELD_TO_WITH_ADMIN_OPT   4
 
#define MYSQL_DEFAULT_ROLE_FIELD_HOST   0
 
#define MYSQL_DEFAULT_ROLE_FIELD_USER   1
 
#define MYSQL_DEFAULT_ROLE_FIELD_ROLE_HOST   2
 
#define MYSQL_DEFAULT_ROLE_FIELD_ROLE_USER   3
 

Functions

bool trans_commit_stmt (THD *thd)
 
bool modify_role_edges_in_table (THD *thd, TABLE *table, const Auth_id_ref &from_user, const Auth_id_ref &to_user, bool with_admin_option, bool delete_option)
 
bool modify_default_roles_in_table (THD *thd, TABLE *table, const Auth_id_ref &auth_id, const Auth_id_ref &role, bool delete_option)
 
bool populate_roles_caches (THD *thd, TABLE_LIST *tablelst)
 

Variables

Granted_roles_graphg_granted_roles
 
Default_rolesg_default_roles
 
Role_index_mapg_authid_to_vertex
 

Macro Definition Documentation

◆ MYSQL_DEFAULT_ROLE_FIELD_HOST

#define MYSQL_DEFAULT_ROLE_FIELD_HOST   0

◆ MYSQL_DEFAULT_ROLE_FIELD_ROLE_HOST

#define MYSQL_DEFAULT_ROLE_FIELD_ROLE_HOST   2

◆ MYSQL_DEFAULT_ROLE_FIELD_ROLE_USER

#define MYSQL_DEFAULT_ROLE_FIELD_ROLE_USER   3

◆ MYSQL_DEFAULT_ROLE_FIELD_USER

#define MYSQL_DEFAULT_ROLE_FIELD_USER   1

◆ MYSQL_ROLE_EDGES_FIELD_FROM_HOST

#define MYSQL_ROLE_EDGES_FIELD_FROM_HOST   0

◆ MYSQL_ROLE_EDGES_FIELD_FROM_USER

#define MYSQL_ROLE_EDGES_FIELD_FROM_USER   1

◆ MYSQL_ROLE_EDGES_FIELD_TO_HOST

#define MYSQL_ROLE_EDGES_FIELD_TO_HOST   2

◆ MYSQL_ROLE_EDGES_FIELD_TO_USER

#define MYSQL_ROLE_EDGES_FIELD_TO_USER   3

◆ MYSQL_ROLE_EDGES_FIELD_TO_WITH_ADMIN_OPT

#define MYSQL_ROLE_EDGES_FIELD_TO_WITH_ADMIN_OPT   4

Function Documentation

◆ modify_default_roles_in_table()

bool modify_default_roles_in_table ( THD thd,
TABLE table,
const Auth_id_ref auth_id,
const Auth_id_ref role,
bool  delete_option 
)

◆ modify_role_edges_in_table()

bool modify_role_edges_in_table ( THD thd,
TABLE table,
const Auth_id_ref from_user,
const Auth_id_ref to_user,
bool  with_admin_option,
bool  delete_option 
)

◆ populate_roles_caches()

bool populate_roles_caches ( THD thd,
TABLE_LIST tablelst 
)

◆ trans_commit_stmt()

bool trans_commit_stmt ( THD thd)

Variable Documentation

◆ g_authid_to_vertex

Role_index_map* g_authid_to_vertex

◆ g_default_roles

Default_roles* g_default_roles

◆ g_granted_roles

Granted_roles_graph* g_granted_roles