MySQL 9.1.0
Source Code Documentation
user_table.h File Reference
#include "my_inttypes.h"

Go to the source code of this file.

Classes

class  acl_table::Pod_user_what_to_update
 

Namespaces

namespace  acl_table
 

Functions

int replace_user_table (THD *thd, TABLE *table, LEX_USER *combo, Access_bitmask rights, bool revoke_grant, bool can_create_user, acl_table::Pod_user_what_to_update &what_to_update, Restrictions *restrictions=nullptr, I_multi_factor_auth *mfa=nullptr)
 Search and create/update a record for the user requested. More...
 
bool read_user_table (THD *thd, TABLE *table)
 Read data from user table and fill in-memory caches. More...
 

Variables

const ulong acl_table::USER_ATTRIBUTE_NONE = 0L
 
const ulong acl_table::USER_ATTRIBUTE_RETAIN_PASSWORD = (1L << 0)
 
const ulong acl_table::USER_ATTRIBUTE_DISCARD_PASSWORD = (1L << 1)
 
const ulong acl_table::USER_ATTRIBUTE_RESTRICTIONS = (1L << 3)
 
const ulong acl_table::USER_ATTRIBUTE_FAILED_LOGIN_ATTEMPTS = (1L << 4)
 
const ulong acl_table::USER_ATTRIBUTE_PASSWORD_LOCK_TIME = (1L << 5)
 
const ulong acl_table::USER_ATTRIBUTE_UPDATE_MFA = (1L << 6)
 

Function Documentation

◆ read_user_table()

bool read_user_table ( THD thd,
TABLE table 
)

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

Parameters
[in]thdTHD handle
[in]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,
Access_bitmask  rights,
bool  revoke_grant,
bool  can_create_user,
acl_table::Pod_user_what_to_update what_to_update,
Restrictions restrictions,
I_multi_factor_auth mfa 
)

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
[in]mfaInterface pointer to Multi factor authentication methods
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.