MySQL 8.0.32
Source Code Documentation
user_table.h
Go to the documentation of this file.
1/* Copyright (c) 2018, 2022, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef USER_TABLE_INCLUDED
24#define USER_TABLE_INCLUDED
25
26#include "my_inttypes.h"
27
28// Forward declarations
30class Restrictions;
31class THD;
32struct LEX_USER;
33struct TABLE;
34
35namespace acl_table {
36
37const ulong USER_ATTRIBUTE_NONE = 0L;
38const ulong USER_ATTRIBUTE_RETAIN_PASSWORD = (1L << 0);
39const ulong USER_ATTRIBUTE_DISCARD_PASSWORD = (1L << 1);
40const ulong USER_ATTRIBUTE_RESTRICTIONS = (1L << 3);
42const ulong USER_ATTRIBUTE_PASSWORD_LOCK_TIME = (1L << 5);
43
44const ulong USER_ATTRIBUTE_UPDATE_MFA = (1L << 6);
45
47 public:
49 ulong m_what;
51};
52} // namespace acl_table
53
54int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo, ulong rights,
55 bool revoke_grant, bool can_create_user,
57 Restrictions *restrictions = nullptr,
58 I_multi_factor_auth *mfa = nullptr);
59
60bool read_user_table(THD *thd, TABLE *table);
61#endif /* USER_TABLE_INCLUDED */
An interface to access information about Multi factor authentication methods.
Definition: sql_mfa.h:44
Container of all restrictions for a given user.
Definition: partial_revokes.h:117
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
Definition: user_table.h:46
ulong m_what
Definition: user_table.h:49
ulong m_user_attributes
Definition: user_table.h:50
Pod_user_what_to_update()
Definition: user_table.h:48
#define L
Definition: ctype-tis620.cc:75
Some integer typedefs for easier portability.
Definition: acl_table_base.h:32
const ulong USER_ATTRIBUTE_NONE
Definition: user_table.h:37
const ulong USER_ATTRIBUTE_UPDATE_MFA
Definition: user_table.h:44
const ulong USER_ATTRIBUTE_RETAIN_PASSWORD
Definition: user_table.h:38
const ulong USER_ATTRIBUTE_DISCARD_PASSWORD
Definition: user_table.h:39
const ulong USER_ATTRIBUTE_FAILED_LOGIN_ATTEMPTS
Definition: user_table.h:41
const ulong USER_ATTRIBUTE_RESTRICTIONS
Definition: user_table.h:40
const ulong USER_ATTRIBUTE_PASSWORD_LOCK_TIME
Definition: user_table.h:42
Definition: table.h:2622
Definition: table.h:1395
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=nullptr, I_multi_factor_auth *mfa=nullptr)
Search and create/update a record for the user requested.
Definition: acl_table_user.cc:2123
bool read_user_table(THD *thd, TABLE *table)
Read data from user table and fill in-memory caches.
Definition: acl_table_user.cc:2213