MySQL 9.1.0
Source Code Documentation
|
mysql.user table reader. More...
#include <acl_table_user.h>
Public Member Functions | |
Acl_table_user_reader (THD *thd, TABLE *table) | |
mysql.user table reader constructor. More... | |
~Acl_table_user_reader () override | |
Free resources before we destroy. More... | |
bool | driver () |
Driver function for mysql.user reader. More... | |
bool | setup_table (bool &is_old_db_layout) |
Make table ready to read. More... | |
bool | read_row (bool &super_users_with_empty_plugin) |
Read a row from mysql.user table and add it to in-memory structure. More... | |
Acl_table_op_status | finish_operation (Table_op_error_code &error) override |
Finish mysql.user table read operation. More... | |
void | reset_acl_user (ACL_USER &user) |
Scrub ACL_USER. More... | |
void | read_account_name (ACL_USER &user) |
Get user and host information for the account. More... | |
bool | read_authentication_string (ACL_USER &user) |
Read authentication string for the account. More... | |
void | read_privileges (ACL_USER &user) |
Get global privilege information. More... | |
void | read_ssl_fields (ACL_USER &user) |
Read SSL restrictions. More... | |
void | read_user_resources (ACL_USER &user) |
Read user resource restrictions. More... | |
bool | read_plugin_info (ACL_USER &user, bool &super_users_with_empty_plugin) |
Read plugin information. More... | |
bool | read_password_expiry (ACL_USER &user, bool &password_expired) |
Read password expiry field. More... | |
void | read_password_locked (ACL_USER &user) |
Determine if user account is locked. More... | |
void | read_password_last_changed (ACL_USER &user) |
Get password change time. More... | |
void | read_password_lifetime (ACL_USER &user) |
Get password expiry policy infomration. More... | |
void | read_password_history_fields (ACL_USER &user) |
Get password history restriction. More... | |
void | read_password_reuse_time_fields (ACL_USER &user) |
Get password reuse time restriction. More... | |
void | read_password_require_current (ACL_USER &user) |
Get information about requiring current password while changing password. More... | |
bool | read_user_attributes (ACL_USER &user) |
Read user attributes. More... | |
void | add_row_to_acl_users (ACL_USER &user) |
Add a recently read row in acl_users. More... | |
Public Member Functions inherited from acl_table::Acl_table | |
Acl_table (THD *thd, TABLE *table, Acl_table_operation operation) | |
virtual | ~Acl_table ()=default |
Acl_table (const Acl_table &)=delete | |
const Acl_table & | operator= (const Acl_table &)=delete |
Acl_table (const Acl_table &&)=delete | |
const Acl_table & | operator= (const Acl_table &&)=delete |
Acl_table_operation | get_operation_mode () |
Additional Inherited Members | |
Protected Member Functions inherited from acl_table::Acl_table | |
Acl_table_op_status | convert_table_op_error_code () |
Protected Attributes inherited from acl_table::Acl_table | |
THD * | m_thd |
TABLE * | m_table |
Acl_table_operation | m_operation |
Table_op_error_code | m_error |
mysql.user table reader.
It reads all raws from table and create in-memory cache.
mysql.user table reader constructor.
[in] | thd | Handle to THD object. Must be non-null |
[in] | table | mysql.user table handle. Must be non-null |
|
override |
Free resources before we destroy.
void acl_table::Acl_table_user_reader::add_row_to_acl_users | ( | ACL_USER & | user | ) |
Add a recently read row in acl_users.
[in] | user | ACL_USER structure |
bool acl_table::Acl_table_user_reader::driver | ( | ) |
Driver function for mysql.user reader.
Reads rows from table. If a row is valid, adds corresponding information to in-memory structure.
false | Success |
true | Error reading the table. Probably corrupt. |
|
overridevirtual |
Finish mysql.user table read operation.
[in] | error | Table operation error. |
Implements acl_table::Acl_table.
void acl_table::Acl_table_user_reader::read_account_name | ( | ACL_USER & | user | ) |
Get user and host information for the account.
[out] | user | ACL_USER structure |
bool acl_table::Acl_table_user_reader::read_authentication_string | ( | ACL_USER & | user | ) |
Read authentication string for the account.
We do verification later.
[out] | user | ACL_USER structure |
false | Success |
true | Error reading the field. Skip user. |
bool acl_table::Acl_table_user_reader::read_password_expiry | ( | ACL_USER & | user, |
bool & | password_expired | ||
) |
Read password expiry field.
[out] | user | ACL_USER structure |
[out] | password_expired | Whether password is expired or not |
false | Success |
true | Password expiry was set to TRUE for a plugin that does not support password expiration. Skip user. |
void acl_table::Acl_table_user_reader::read_password_history_fields | ( | ACL_USER & | user | ) |
Get password history restriction.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::read_password_last_changed | ( | ACL_USER & | user | ) |
Get password change time.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::read_password_lifetime | ( | ACL_USER & | user | ) |
Get password expiry policy infomration.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::read_password_locked | ( | ACL_USER & | user | ) |
Determine if user account is locked.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::read_password_require_current | ( | ACL_USER & | user | ) |
Get information about requiring current password while changing password.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::read_password_reuse_time_fields | ( | ACL_USER & | user | ) |
Get password reuse time restriction.
[out] | user | ACL_USER structure |
bool acl_table::Acl_table_user_reader::read_plugin_info | ( | ACL_USER & | user, |
bool & | super_users_with_empty_plugin | ||
) |
Read plugin information.
Also, validate authentication string against expected format for the plugin.
[out] | user | ACL_USER structure |
[out] | super_users_with_empty_plugin | User has SUPER privilege or not |
false | Success |
true | Error. Skip user. |
void acl_table::Acl_table_user_reader::read_privileges | ( | ACL_USER & | user | ) |
Get global privilege information.
[out] | user | ACL_USER structure |
bool acl_table::Acl_table_user_reader::read_row | ( | bool & | super_users_with_empty_plugin | ) |
Read a row from mysql.user table and add it to in-memory structure.
[in] | super_users_with_empty_plugin | User has SUPER privilege |
false | Success |
true | Error reading the row. Unless critical, keep reading further. |
void acl_table::Acl_table_user_reader::read_ssl_fields | ( | ACL_USER & | user | ) |
Read SSL restrictions.
[out] | user | ACL_USER structure |
bool acl_table::Acl_table_user_reader::read_user_attributes | ( | ACL_USER & | user | ) |
Read user attributes.
[out] | user | ACL_USER structure |
false | Success |
true | Error reading user_attributes column |
void acl_table::Acl_table_user_reader::read_user_resources | ( | ACL_USER & | user | ) |
Read user resource restrictions.
[out] | user | ACL_USER structure |
void acl_table::Acl_table_user_reader::reset_acl_user | ( | ACL_USER & | user | ) |
Scrub ACL_USER.
[out] | user | ACL_USER to be updated |
bool acl_table::Acl_table_user_reader::setup_table | ( | bool & | is_old_db_layout | ) |
Make table ready to read.
[out] | is_old_db_layout | To see if this is a case of running new binary with old data directory without running mysql_upgrade. |
false | Success |
true | Error initializing table |
|
private |
|
private |
|
private |
|
private |
|
private |