MySQL  8.0.22
Source Code Documentation
events.h
Go to the documentation of this file.
1 /* Copyright (c) 2016, 2020, Oracle and/or its affiliates.
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 DD_TABLES__EVENTS_INCLUDED
24 #define DD_TABLES__EVENTS_INCLUDED
25 
26 #include <string>
27 
30 #include "sql/dd/object_id.h"
31 #include "sql/dd/string_type.h"
32 #include "sql/dd/types/event.h"
33 
34 namespace dd {
35 
36 class Item_name_key;
37 class Object_key;
38 
39 namespace tables {
40 
41 ///////////////////////////////////////////////////////////////////////////
42 
44  public:
45  static const Events &instance();
46 
47  static const CHARSET_INFO *name_collation();
48 
49  enum enum_fields {
50  FIELD_ID = static_cast<uint>(Common_field::ID),
74  NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
75  };
76 
77  enum enum_indexes {
84  };
85 
91  };
92 
93  Events();
94 
95  Event *create_entity_object(const Raw_record &) const override;
96 
97  static bool update_object_key(Item_name_key *key, Object_id schema_id,
98  const String_type &event_name);
99 
100  static Object_key *create_key_by_schema_id(Object_id schema_id);
101 
102  /**
103  Create a key to find all events for a given definer.
104 
105  @param definer Name of the definer.
106 
107  @returns Pointer to Object_key.
108  */
109  static Object_key *create_key_by_definer(const String_type &definer);
110 };
111 
112 ///////////////////////////////////////////////////////////////////////////
113 
114 } // namespace tables
115 } // namespace dd
116 
117 #endif // DD_TABLES__EVENTS_INCLUDED
static const CHARSET_INFO * name_collation()
Definition: events.cc:46
static const Events & instance()
Definition: events.cc:39
Definition: events.h:73
Definition: object_key.h:37
const char * event_name[]
Definition: test_pfs_resource_group.cc:71
enum_foreign_keys
Definition: events.h:86
Definition: object_keys.h:165
enum_indexes
Definition: events.h:77
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
Definition: events.h:87
Definition: event.h:47
static Object_key * create_key_by_schema_id(Object_id schema_id)
Definition: events.cc:154
Definition: events.h:63
Events()
Definition: events.cc:52
Definition: events.h:78
Definition: events.h:62
static bool update_object_key(Item_name_key *key, Object_id schema_id, const String_type &event_name)
Definition: events.cc:139
static Object_key * create_key_by_definer(const String_type &definer)
Create a key to find all events for a given definer.
Definition: events.cc:161
Definition: events.h:43
Definition: events.h:68
unsigned int uint
Definition: uca-dump.cc:29
unsigned long long Object_id
Definition: object_id.h:30
Definition: events.h:53
Definition: m_ctype.h:359
Definition: events.h:60
Definition: events.h:50
static const char * key
Definition: suite_stubs.c:14
Event * create_entity_object(const Raw_record &) const override
Definition: events.cc:148
enum_fields
Definition: events.h:49
Definition: events.h:65
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:40
Definition: raw_record.h:53
Definition: events.h:61
Definition: entity_object_table_impl.h:44
Definition: events.h:52