MySQL 8.4.0
Source Code Documentation
events.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DD_TABLES__EVENTS_INCLUDED
25#define DD_TABLES__EVENTS_INCLUDED
26
27#include <string>
28
31#include "sql/dd/object_id.h"
32#include "sql/dd/string_type.h"
33#include "sql/dd/types/event.h"
34
35struct CHARSET_INFO;
36
37namespace dd {
38
39class Item_name_key;
40class Object_key;
41
42namespace tables {
43
44///////////////////////////////////////////////////////////////////////////
45
47 public:
48 static const Events &instance();
49
50 static const CHARSET_INFO *name_collation();
51
53 FIELD_ID = static_cast<uint>(Common_field::ID),
77 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
78 };
79
81 INDEX_PK_ID = static_cast<uint>(Common_index::PK_ID),
87 };
88
94 };
95
96 Events();
97
98 Event *create_entity_object(const Raw_record &) const override;
99
100 static bool update_object_key(Item_name_key *key, Object_id schema_id,
101 const String_type &event_name);
102
104
105 /**
106 Create a key to find all events for a given definer.
107
108 @param definer Name of the definer.
109
110 @returns Pointer to Object_key.
111 */
112 static Object_key *create_key_by_definer(const String_type &definer);
113};
114
115///////////////////////////////////////////////////////////////////////////
116
117} // namespace tables
118} // namespace dd
119
120#endif // DD_TABLES__EVENTS_INCLUDED
Definition: entity_object_table_impl.h:46
Definition: event.h:48
Definition: object_keys.h:166
Definition: object_key.h:38
Definition: raw_record.h:46
Definition: events.h:46
static const Events & instance()
Definition: events.cc:40
static Object_key * create_key_by_schema_id(Object_id schema_id)
Definition: events.cc:155
Event * create_entity_object(const Raw_record &) const override
Definition: events.cc:149
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:162
static bool update_object_key(Item_name_key *key, Object_id schema_id, const String_type &event_name)
Definition: events.cc:140
static const CHARSET_INFO * name_collation()
Definition: events.cc:47
enum_foreign_keys
Definition: events.h:89
@ FK_CLIENT_COLLATION_ID
Definition: events.h:91
@ FK_CONNECTION_COLLATION_ID
Definition: events.h:92
@ FK_SCHEMA_ID
Definition: events.h:90
@ FK_SCHEMA_COLLATION_ID
Definition: events.h:93
Events()
Definition: events.cc:53
enum_fields
Definition: events.h:52
@ FIELD_STATUS
Definition: events.h:66
@ NUMBER_OF_FIELDS
Definition: events.h:77
@ FIELD_CONNECTION_COLLATION_ID
Definition: events.h:74
@ FIELD_ON_COMPLETION
Definition: events.h:67
@ FIELD_OPTIONS
Definition: events.h:76
@ FIELD_INTERVAL_VALUE
Definition: events.h:61
@ FIELD_DEFINITION
Definition: events.h:58
@ FIELD_LAST_ALTERED
Definition: events.h:69
@ FIELD_COMMENT
Definition: events.h:71
@ FIELD_TIME_ZONE
Definition: events.h:57
@ FIELD_EXECUTE_AT
Definition: events.h:60
@ FIELD_INTERVAL_FIELD
Definition: events.h:62
@ FIELD_ENDS
Definition: events.h:65
@ FIELD_SQL_MODE
Definition: events.h:63
@ FIELD_LAST_EXECUTED
Definition: events.h:70
@ FIELD_SCHEMA_ID
Definition: events.h:54
@ FIELD_DEFINER
Definition: events.h:56
@ FIELD_DEFINITION_UTF8
Definition: events.h:59
@ FIELD_STARTS
Definition: events.h:64
@ FIELD_ID
Definition: events.h:53
@ FIELD_ORIGINATOR
Definition: events.h:72
@ FIELD_CLIENT_COLLATION_ID
Definition: events.h:73
@ FIELD_CREATED
Definition: events.h:68
@ FIELD_SCHEMA_COLLATION_ID
Definition: events.h:75
@ FIELD_NAME
Definition: events.h:55
enum_indexes
Definition: events.h:80
@ INDEX_PK_ID
Definition: events.h:81
@ INDEX_K_SCHEMA_COLLATION_ID
Definition: events.h:85
@ INDEX_UK_SCHEMA_ID_NAME
Definition: events.h:82
@ INDEX_K_DEFINER
Definition: events.h:86
@ INDEX_K_CONNECTION_COLLATION_ID
Definition: events.h:84
@ INDEX_K_CLIENT_COLLATION_ID
Definition: events.h:83
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
required string key
Definition: replication_asynchronous_connection_failover.proto:60
Definition: m_ctype.h:423