MySQL 8.0.40
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
35namespace dd {
36
37class Item_name_key;
38class Object_key;
39
40namespace tables {
41
42///////////////////////////////////////////////////////////////////////////
43
45 public:
46 static const Events &instance();
47
48 static const CHARSET_INFO *name_collation();
49
75 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
76 };
77
85 };
86
92 };
93
94 Events();
95
96 Event *create_entity_object(const Raw_record &) const override;
97
98 static bool update_object_key(Item_name_key *key, Object_id schema_id,
99 const String_type &event_name);
100
102
103 /**
104 Create a key to find all events for a given definer.
105
106 @param definer Name of the definer.
107
108 @returns Pointer to Object_key.
109 */
110 static Object_key *create_key_by_definer(const String_type &definer);
111};
112
113///////////////////////////////////////////////////////////////////////////
114
115} // namespace tables
116} // namespace dd
117
118#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:44
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:87
@ FK_CLIENT_COLLATION_ID
Definition: events.h:89
@ FK_CONNECTION_COLLATION_ID
Definition: events.h:90
@ FK_SCHEMA_ID
Definition: events.h:88
@ FK_SCHEMA_COLLATION_ID
Definition: events.h:91
Events()
Definition: events.cc:53
enum_fields
Definition: events.h:50
@ FIELD_STATUS
Definition: events.h:64
@ NUMBER_OF_FIELDS
Definition: events.h:75
@ FIELD_CONNECTION_COLLATION_ID
Definition: events.h:72
@ FIELD_ON_COMPLETION
Definition: events.h:65
@ FIELD_OPTIONS
Definition: events.h:74
@ FIELD_INTERVAL_VALUE
Definition: events.h:59
@ FIELD_DEFINITION
Definition: events.h:56
@ FIELD_LAST_ALTERED
Definition: events.h:67
@ FIELD_COMMENT
Definition: events.h:69
@ FIELD_TIME_ZONE
Definition: events.h:55
@ FIELD_EXECUTE_AT
Definition: events.h:58
@ FIELD_INTERVAL_FIELD
Definition: events.h:60
@ FIELD_ENDS
Definition: events.h:63
@ FIELD_SQL_MODE
Definition: events.h:61
@ FIELD_LAST_EXECUTED
Definition: events.h:68
@ FIELD_SCHEMA_ID
Definition: events.h:52
@ FIELD_DEFINER
Definition: events.h:54
@ FIELD_DEFINITION_UTF8
Definition: events.h:57
@ FIELD_STARTS
Definition: events.h:62
@ FIELD_ID
Definition: events.h:51
@ FIELD_ORIGINATOR
Definition: events.h:70
@ FIELD_CLIENT_COLLATION_ID
Definition: events.h:71
@ FIELD_CREATED
Definition: events.h:66
@ FIELD_SCHEMA_COLLATION_ID
Definition: events.h:73
@ FIELD_NAME
Definition: events.h:53
enum_indexes
Definition: events.h:78
@ INDEX_PK_ID
Definition: events.h:79
@ INDEX_K_SCHEMA_COLLATION_ID
Definition: events.h:83
@ INDEX_UK_SCHEMA_ID_NAME
Definition: events.h:80
@ INDEX_K_DEFINER
Definition: events.h:84
@ INDEX_K_CONNECTION_COLLATION_ID
Definition: events.h:82
@ INDEX_K_CLIENT_COLLATION_ID
Definition: events.h:81
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:385
unsigned int uint
Definition: uca9-dump.cc:75