MySQL  8.0.18
Source Code Documentation
user_table.h
Go to the documentation of this file.
1 /* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
2 
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6 
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, 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 #include "sql/sql_class.h"
28 #include "sql/table.h"
29 
30 // Forward declarations
31 class Restrictions;
32 
33 namespace acl_table {
34 
39 
41  public:
45 };
46 } // namespace acl_table
47 
48 int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo, ulong rights,
49  bool revoke_grant, bool can_create_user,
50  acl_table::Pod_user_what_to_update &what_to_update,
51  Restrictions *restrictions = nullptr);
52 
53 bool read_user_table(THD *thd, TABLE *table);
54 #endif /* USER_TABLE_INCLUDED */
Some integer typedefs for easier portability.
Container of all restrictions for a given user.
Definition: partial_revokes.h:126
const ulong USER_ATTRIBUTE_NONE
Definition: user_table.h:35
ulong m_user_attributes
Definition: user_table.h:44
Definition: table.h:1301
Definition: table.h:2367
Pod_user_what_to_update()
Definition: user_table.h:42
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)
Search and create/update a record for the user requested.
Definition: acl_table_user.cc:1903
Definition: acl_table_base.h:31
const ulong USER_ATTRIBUTE_RETAIN_PASSWORD
Definition: user_table.h:36
bool read_user_table(THD *thd, TABLE *table)
Read data from user table and fill in-memory caches.
Definition: acl_table_user.cc:1963
ulong m_what
Definition: user_table.h:43
#define L
Definition: ctype-tis620.cc:73
const ulong USER_ATTRIBUTE_DISCARD_PASSWORD
Definition: user_table.h:37
const ulong USER_ATTRIBUTE_RESTRICTIONS
Definition: user_table.h:38
unsigned long ulong
Definition: my_inttypes.h:48
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:778
Definition: user_table.h:40