MySQL  8.0.21
Source Code Documentation
acl_change_notification.h
Go to the documentation of this file.
1 /* Copyright (c) 2019, 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 
24 #ifndef ACL_CHANGE_NOTIFICATION_INCLUDED
25 #define ACL_CHANGE_NOTIFICATION_INCLUDED
26 
27 #include "my_sqlcommand.h" // enum_sql_command
28 #include "sql/table.h" // LEX_USER, LEX_CSTRING, List
29 
30 class Rewrite_params; // forward declaration
31 
33  public:
34  struct User {
35  std::string name;
36  std::string host;
37  User(const LEX_USER &lex_user)
38  : name(lex_user.user.str, lex_user.user.length),
39  host(lex_user.host.str, lex_user.host.length) {}
40  };
41 
43  const List<LEX_USER> *users,
45  const List<LEX_CSTRING> *dynamic_privs);
46 
47  private:
49  std::string db;
50  std::vector<User> user_list;
51  std::vector<std::string> dynamic_privilege_list;
53 
54  public:
56  const std::string &get_db() const { return db; }
57  const std::vector<User> &get_user_list() const { return user_list; }
58  const std::vector<std::string> &get_dynamic_privilege_list() const {
60  }
62 };
63 
64 #endif
const std::vector< std::string > & get_dynamic_privilege_list() const
Definition: acl_change_notification.h:58
char * user
Definition: mysqladmin.cc:59
const std::string & get_db() const
Definition: acl_change_notification.h:56
Definition: acl_change_notification.h:34
Rewrite_params * rewrite_params
Definition: acl_change_notification.h:52
Rewrite_params * get_rewrite_params() const
Definition: acl_change_notification.h:61
enum_sql_command
Definition: my_sqlcommand.h:45
std::string host
Definition: acl_change_notification.h:36
Definition: table.h:2393
std::vector< User > user_list
Definition: acl_change_notification.h:50
std::string name
Definition: acl_change_notification.h:35
std::string db
Definition: acl_change_notification.h:49
User(const LEX_USER &lex_user)
Definition: acl_change_notification.h:37
An interface to wrap the paramters required by specific Rewriter.
Definition: sql_rewrite.h:49
std::vector< std::string > dynamic_privilege_list
Definition: acl_change_notification.h:51
Acl_change_notification(class THD *thd, enum_sql_command op, const List< LEX_USER > *users, Rewrite_params *rewrite_params, const List< LEX_CSTRING > *dynamic_privs)
Notify handlerton(s) that privileges have changed.
Definition: sql_user_table.cc:559
enum_sql_command operation
Definition: acl_change_notification.h:48
Definition: acl_change_notification.h:32
enum_sql_command get_operation() const
Definition: acl_change_notification.h:55
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
const std::vector< User > & get_user_list() const
Definition: acl_change_notification.h:57
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:799