MySQL 9.1.0
Source Code Documentation
user_table.h
Go to the documentation of this file.
1/* Copyright (c) 2018, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef USER_TABLE_INCLUDED
25#define USER_TABLE_INCLUDED
26
27#include "my_inttypes.h"
28
29// Forward declarations
31class Restrictions;
32class THD;
33struct LEX_USER;
34struct TABLE;
35
36namespace acl_table {
37
38const ulong USER_ATTRIBUTE_NONE = 0L;
39const ulong USER_ATTRIBUTE_RETAIN_PASSWORD = (1L << 0);
40const ulong USER_ATTRIBUTE_DISCARD_PASSWORD = (1L << 1);
41const ulong USER_ATTRIBUTE_RESTRICTIONS = (1L << 3);
43const ulong USER_ATTRIBUTE_PASSWORD_LOCK_TIME = (1L << 5);
44
45const ulong USER_ATTRIBUTE_UPDATE_MFA = (1L << 6);
46
48 public:
50 ulong m_what;
52};
53} // namespace acl_table
54
55int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo,
56 Access_bitmask rights, bool revoke_grant,
57 bool can_create_user,
59 Restrictions *restrictions = nullptr,
60 I_multi_factor_auth *mfa = nullptr);
61
62bool read_user_table(THD *thd, TABLE *table);
63#endif /* USER_TABLE_INCLUDED */
uint32_t Access_bitmask
Definition: auth_acls.h:34
An interface to access information about Multi factor authentication methods.
Definition: sql_mfa.h:49
Container of all restrictions for a given user.
Definition: partial_revokes.h:155
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: user_table.h:47
ulong m_what
Definition: user_table.h:50
ulong m_user_attributes
Definition: user_table.h:51
Pod_user_what_to_update()
Definition: user_table.h:49
#define L
Definition: ctype-tis620.cc:75
Some integer typedefs for easier portability.
Definition: acl_table_base.h:33
const ulong USER_ATTRIBUTE_NONE
Definition: user_table.h:38
const ulong USER_ATTRIBUTE_UPDATE_MFA
Definition: user_table.h:45
const ulong USER_ATTRIBUTE_RETAIN_PASSWORD
Definition: user_table.h:39
const ulong USER_ATTRIBUTE_DISCARD_PASSWORD
Definition: user_table.h:40
const ulong USER_ATTRIBUTE_FAILED_LOGIN_ATTEMPTS
Definition: user_table.h:42
const ulong USER_ATTRIBUTE_RESTRICTIONS
Definition: user_table.h:41
const ulong USER_ATTRIBUTE_PASSWORD_LOCK_TIME
Definition: user_table.h:43
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
Definition: table.h:2767
Definition: table.h:1421
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.
Definition: acl_table_user.cc:2080
bool read_user_table(THD *thd, TABLE *table)
Read data from user table and fill in-memory caches.
Definition: acl_table_user.cc:2171