MySQL  8.0.19
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 
31  public:
32  struct User {
33  std::string name;
34  std::string host;
35  User(const LEX_USER &lex_user)
36  : name(lex_user.user.str, lex_user.user.length),
37  host(lex_user.host.str, lex_user.host.length) {}
38  };
39 
41  const List<LEX_USER> *users,
42  const List<LEX_CSTRING> *dynamic_privs);
43 
44  private:
46  std::string db;
47  std::string query;
48  std::vector<User> user_list;
49  std::vector<std::string> dynamic_privilege_list;
50 
51  public:
53  const std::string &get_db() const { return db; }
54  const std::string &get_query_for_logging() const { return query; }
55  const std::vector<User> &get_user_list() const { return user_list; }
56  const std::vector<std::string> &get_dynamic_privilege_list() const {
58  }
59 };
60 
61 #endif
THD
Definition: sql_class.h:764
Acl_change_notification::User::name
std::string name
Definition: acl_change_notification.h:33
my_sqlcommand.h
Acl_change_notification::db
std::string db
Definition: acl_change_notification.h:46
Acl_change_notification::User::User
User(const LEX_USER &lex_user)
Definition: acl_change_notification.h:35
LEX_USER
Definition: table.h:2366
Acl_change_notification::User
Definition: acl_change_notification.h:32
Acl_change_notification::get_db
const std::string & get_db() const
Definition: acl_change_notification.h:53
Acl_change_notification::query
std::string query
Definition: acl_change_notification.h:47
Acl_change_notification::get_operation
enum_sql_command get_operation() const
Definition: acl_change_notification.h:52
Acl_change_notification
Definition: acl_change_notification.h:30
Acl_change_notification::get_dynamic_privilege_list
const std::vector< std::string > & get_dynamic_privilege_list() const
Definition: acl_change_notification.h:56
enum_sql_command
enum_sql_command
Definition: my_sqlcommand.h:45
user
char * user
Definition: mysqladmin.cc:59
Acl_change_notification::User::host
std::string host
Definition: acl_change_notification.h:34
Acl_change_notification::dynamic_privilege_list
std::vector< std::string > dynamic_privilege_list
Definition: acl_change_notification.h:49
gis::length
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
Acl_change_notification::Acl_change_notification
Acl_change_notification(class THD *thd, enum_sql_command op, const List< LEX_USER > *users, const List< LEX_CSTRING > *dynamic_privs)
Notify handlerton(s) that privileges have changed.
Definition: sql_user_table.cc:535
table.h
Acl_change_notification::get_query_for_logging
const std::string & get_query_for_logging() const
Definition: acl_change_notification.h:54
List< LEX_USER >
Acl_change_notification::user_list
std::vector< User > user_list
Definition: acl_change_notification.h:48
Acl_change_notification::operation
enum_sql_command operation
Definition: acl_change_notification.h:45
Acl_change_notification::get_user_list
const std::vector< User > & get_user_list() const
Definition: acl_change_notification.h:55