MySQL  8.0.18
Source Code Documentation
acl_table_user.cc File Reference

Namespaces

 consts
 
 acl_table
 

Macros

#define INVALID_DATE   "0000-00-00 00:00:00"
 

Functions

const std::string consts::empty_string ("")
 Empty string. More...
 
const std::string consts::additional_password ("additional_password")
 For secondary password. More...
 
const std::string consts::Restrictions ("Restrictions")
 For partial revokes. More...
 
int replace_user_table (THD *thd, TABLE *table, LEX_USER *combo, ulong rights, bool revoke_grant, bool can_create_user, acl_table::Pod_user_what_to_update &what_to_update, Restrictions *restrictions)
 Search and create/update a record for the user requested. More...
 
bool read_user_table (THD *thd, TABLE *m_table)
 Read data from user table and fill in-memory caches. More...
 

Variables

const struct timeval consts::BEGIN_TIMESTAMP = {0, 0}
 Initial timestamp. More...
 
const int consts::CRITICAL_ERROR = -1
 Error indicating table operation error. More...
 
static std::map< const User_attribute_type, const std::string > acl_table::attribute_type_to_str
 Keys used in mysql.user.user_attributes. More...
 

Macro Definition Documentation

◆ INVALID_DATE

#define INVALID_DATE   "0000-00-00 00:00:00"

Function Documentation

◆ read_user_table()

bool read_user_table ( THD thd,
TABLE m_table 
)

Read data from user table and fill in-memory caches.

Parameters
[in]thdTHD handle
[in]m_tablemysql.user table handle
Returns
status of reading data from table
Return values
trueError reading data. Don't trust it.
falseAll well.

◆ replace_user_table()

int replace_user_table ( THD thd,
TABLE table,
LEX_USER combo,
ulong  rights,
bool  revoke_grant,
bool  can_create_user,
acl_table::Pod_user_what_to_update what_to_update,
Restrictions restrictions 
)

Search and create/update a record for the user requested.

Parameters
[in]thdThe current thread.
[in]tablePointer to a TABLE object of mysql.user table
[in]comboUser information
[in]rightsRights requested
[in]revoke_grantSet to true if a REVOKE command is executed
[in]can_create_userSet true if it's allowed to create user
[in]what_to_updateBitmap indicating which attributes need to be updated.
[in]restrictionsRestrictions handle if there is any
Returns
Operation result
Return values
0OK.
<0 System error or storage engine error happen
>0 Error in handling current user entry but still can continue processing subsequent user specified in the ACL statement.

Variable Documentation

◆ m_additional_password

std::string m_additional_password
private

Second password for user.

◆ m_auth_id

Auth_id m_auth_id
private

Auth ID.

◆ m_global_privs

ulong m_global_privs
private

Global static privileges.

◆ m_mem_root

MEM_ROOT* m_mem_root
private

Mem root.

◆ m_read

bool m_read
private

Operation.

◆ m_restrictions

Restrictions m_restrictions
private

Restrictions_list on certain databases for user.