MySQL  8.0.19
Source Code Documentation
acl_table_user.cc File Reference
#include "sql/auth/acl_table_user.h"
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <map>
#include "field_types.h"
#include "lex_string.h"
#include "m_ctype.h"
#include "m_string.h"
#include "my_base.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_loglevel.h"
#include "my_sqlcommand.h"
#include "my_sys.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/plugin.h"
#include "mysql/plugin_auth.h"
#include "mysql/psi/psi_base.h"
#include "mysql_time.h"
#include "mysqld_error.h"
#include "prealloced_array.h"
#include "sql/auth/auth_acls.h"
#include "sql/auth/auth_common.h"
#include "sql/auth/auth_internal.h"
#include "sql/auth/partial_revokes.h"
#include "sql/auth/sql_auth_cache.h"
#include "sql/auth/sql_authentication.h"
#include "sql/auth/sql_user_table.h"
#include "sql/auth/user_table.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/item_func.h"
#include "sql/json_dom.h"
#include "sql/key.h"
#include "sql/mysqld.h"
#include "sql/records.h"
#include "sql/row_iterator.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/sql_lex.h"
#include "sql/sql_plugin.h"
#include "sql/sql_plugin_ref.h"
#include "sql/sql_time.h"
#include "sql/sql_update.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/thr_malloc.h"
#include "sql/tztime.h"
#include "sql_string.h"
#include "template_utils.h"
#include "typelib.h"
#include "violite.h"

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...
 
const std::string consts::Password_locking ("Password_locking")
 for password locking More...
 
const std::string consts::failed_login_attempts ("failed_login_attempts")
 underkeys of password locking More...
 
const std::string consts::password_lock_time_days ("password_lock_time_days")
 underkeys of password locking 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_password_lock

Password_lock m_password_lock
private

password locking

◆ m_read_restrictions

bool m_read_restrictions
private

Operation for restrictions.

◆ m_restrictions

Restrictions m_restrictions
private

Restrictions_list on certain databases for user.