MySQL 8.3.0
Source Code Documentation
events.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2023, 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
34struct CHARSET_INFO;
35
36namespace dd {
37
38class Item_name_key;
39class Object_key;
40
41namespace tables {
42
43///////////////////////////////////////////////////////////////////////////
44
46 public:
47 static const Events &instance();
48
49 static const CHARSET_INFO *name_collation();
50
52 FIELD_ID = static_cast<uint>(Common_field::ID),
76 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
77 };
78
80 INDEX_PK_ID = static_cast<uint>(Common_index::PK_ID),
86 };
87
93 };
94
95 Events();
96
97 Event *create_entity_object(const Raw_record &) const override;
98
99 static bool update_object_key(Item_name_key *key, Object_id schema_id,
100 const String_type &event_name);
101
103
104 /**
105 Create a key to find all events for a given definer.
106
107 @param definer Name of the definer.
108
109 @returns Pointer to Object_key.
110 */
111 static Object_key *create_key_by_definer(const String_type &definer);
112};
113
114///////////////////////////////////////////////////////////////////////////
115
116} // namespace tables
117} // namespace dd
118
119#endif // DD_TABLES__EVENTS_INCLUDED
Definition: entity_object_table_impl.h:45
Definition: event.h:47
Definition: object_keys.h:165
Definition: object_key.h:37
Definition: raw_record.h:45
Definition: events.h:45
static const Events & instance()
Definition: events.cc:39
static Object_key * create_key_by_schema_id(Object_id schema_id)
Definition: events.cc:154
Event * create_entity_object(const Raw_record &) const override
Definition: events.cc:148
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
static bool update_object_key(Item_name_key *key, Object_id schema_id, const String_type &event_name)
Definition: events.cc:139
static const CHARSET_INFO * name_collation()
Definition: events.cc:46
enum_foreign_keys
Definition: events.h:88
@ FK_CLIENT_COLLATION_ID
Definition: events.h:90
@ FK_CONNECTION_COLLATION_ID
Definition: events.h:91
@ FK_SCHEMA_ID
Definition: events.h:89
@ FK_SCHEMA_COLLATION_ID
Definition: events.h:92
Events()
Definition: events.cc:52
enum_fields
Definition: events.h:51
@ FIELD_STATUS
Definition: events.h:65
@ NUMBER_OF_FIELDS
Definition: events.h:76
@ FIELD_CONNECTION_COLLATION_ID
Definition: events.h:73
@ FIELD_ON_COMPLETION
Definition: events.h:66
@ FIELD_OPTIONS
Definition: events.h:75
@ FIELD_INTERVAL_VALUE
Definition: events.h:60
@ FIELD_DEFINITION
Definition: events.h:57
@ FIELD_LAST_ALTERED
Definition: events.h:68
@ FIELD_COMMENT
Definition: events.h:70
@ FIELD_TIME_ZONE
Definition: events.h:56
@ FIELD_EXECUTE_AT
Definition: events.h:59
@ FIELD_INTERVAL_FIELD
Definition: events.h:61
@ FIELD_ENDS
Definition: events.h:64
@ FIELD_SQL_MODE
Definition: events.h:62
@ FIELD_LAST_EXECUTED
Definition: events.h:69
@ FIELD_SCHEMA_ID
Definition: events.h:53
@ FIELD_DEFINER
Definition: events.h:55
@ FIELD_DEFINITION_UTF8
Definition: events.h:58
@ FIELD_STARTS
Definition: events.h:63
@ FIELD_ID
Definition: events.h:52
@ FIELD_ORIGINATOR
Definition: events.h:71
@ FIELD_CLIENT_COLLATION_ID
Definition: events.h:72
@ FIELD_CREATED
Definition: events.h:67
@ FIELD_SCHEMA_COLLATION_ID
Definition: events.h:74
@ FIELD_NAME
Definition: events.h:54
enum_indexes
Definition: events.h:79
@ INDEX_PK_ID
Definition: events.h:80
@ INDEX_K_SCHEMA_COLLATION_ID
Definition: events.h:84
@ INDEX_UK_SCHEMA_ID_NAME
Definition: events.h:81
@ INDEX_K_DEFINER
Definition: events.h:85
@ INDEX_K_CONNECTION_COLLATION_ID
Definition: events.h:83
@ INDEX_K_CLIENT_COLLATION_ID
Definition: events.h:82
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
unsigned long long Object_id
Definition: object_id.h:30
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Definition: m_ctype.h:422