MySQL 8.0.33
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
34namespace dd {
35
36class Item_name_key;
37class Object_key;
38
39namespace tables {
40
41///////////////////////////////////////////////////////////////////////////
42
44 public:
45 static const Events &instance();
46
47 static const CHARSET_INFO *name_collation();
48
74 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
75 };
76
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
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
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:43
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:86
@ FK_CLIENT_COLLATION_ID
Definition: events.h:88
@ FK_CONNECTION_COLLATION_ID
Definition: events.h:89
@ FK_SCHEMA_ID
Definition: events.h:87
@ FK_SCHEMA_COLLATION_ID
Definition: events.h:90
Events()
Definition: events.cc:52
enum_fields
Definition: events.h:49
@ FIELD_STATUS
Definition: events.h:63
@ NUMBER_OF_FIELDS
Definition: events.h:74
@ FIELD_CONNECTION_COLLATION_ID
Definition: events.h:71
@ FIELD_ON_COMPLETION
Definition: events.h:64
@ FIELD_OPTIONS
Definition: events.h:73
@ FIELD_INTERVAL_VALUE
Definition: events.h:58
@ FIELD_DEFINITION
Definition: events.h:55
@ FIELD_LAST_ALTERED
Definition: events.h:66
@ FIELD_COMMENT
Definition: events.h:68
@ FIELD_TIME_ZONE
Definition: events.h:54
@ FIELD_EXECUTE_AT
Definition: events.h:57
@ FIELD_INTERVAL_FIELD
Definition: events.h:59
@ FIELD_ENDS
Definition: events.h:62
@ FIELD_SQL_MODE
Definition: events.h:60
@ FIELD_LAST_EXECUTED
Definition: events.h:67
@ FIELD_SCHEMA_ID
Definition: events.h:51
@ FIELD_DEFINER
Definition: events.h:53
@ FIELD_DEFINITION_UTF8
Definition: events.h:56
@ FIELD_STARTS
Definition: events.h:61
@ FIELD_ID
Definition: events.h:50
@ FIELD_ORIGINATOR
Definition: events.h:69
@ FIELD_CLIENT_COLLATION_ID
Definition: events.h:70
@ FIELD_CREATED
Definition: events.h:65
@ FIELD_SCHEMA_COLLATION_ID
Definition: events.h:72
@ FIELD_NAME
Definition: events.h:52
enum_indexes
Definition: events.h:77
@ INDEX_PK_ID
Definition: events.h:78
@ INDEX_K_SCHEMA_COLLATION_ID
Definition: events.h:82
@ INDEX_UK_SCHEMA_ID_NAME
Definition: events.h:79
@ INDEX_K_DEFINER
Definition: events.h:83
@ INDEX_K_CONNECTION_COLLATION_ID
Definition: events.h:81
@ INDEX_K_CLIENT_COLLATION_ID
Definition: events.h:80
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:382
unsigned int uint
Definition: uca9-dump.cc:74