MySQL 9.1.0
Source Code Documentation
mysql_server_event_tracking_bridge_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef SQL_SERVER_COMPONENT_MYSQL_SERVER_EVENT_TRACKING_BRIDGE_IMP
25#define SQL_SERVER_COMPONENT_MYSQL_SERVER_EVENT_TRACKING_BRIDGE_IMP
26
27#include <cstddef>
28#include <string>
29#include <unordered_map>
30
43#include "mysql/plugin_audit.h"
44
47
48extern SERVICE_TYPE(event_tracking_authentication) *
50extern SERVICE_TYPE(event_tracking_command) * srv_event_tracking_command;
51extern SERVICE_TYPE(event_tracking_connection) * srv_event_tracking_connection;
52extern SERVICE_TYPE(event_tracking_general) * srv_event_tracking_general;
53extern SERVICE_TYPE(event_tracking_global_variable) *
55extern SERVICE_TYPE(event_tracking_lifecycle) * srv_event_tracking_lifecycle;
56extern SERVICE_TYPE(event_tracking_message) * srv_event_tracking_message;
57extern SERVICE_TYPE(event_tracking_parse) * srv_event_tracking_parse;
58extern SERVICE_TYPE(event_tracking_query) * srv_event_tracking_query;
59extern SERVICE_TYPE(event_tracking_stored_program) *
61extern SERVICE_TYPE(event_tracking_table_access) *
63
65 public:
66 /**
67 Process an general audit event
68
69 @param [in] data Event specific data
70
71 @returns Status of processing the event
72 @retval false Success
73 @retval true Error
74*/
77};
78
80 public:
81 /**
82 Process a connection event
83
84 @param [in] data Event specific data
85
86 @returns Status of processing the event
87 @retval false Success
88 @retval true Error
89*/
92};
93
95 public:
96 /**
97 Process a parse event
98
99 @param [in] data Event specific data
100
101 @returns Status of processing the event
102 @retval false Success
103 @retval true Error
104*/
106};
107
109 public:
110 /**
111 Process a table access event
112
113 @param [in] data Event specific data
114
115 @returns Status of processing the event
116 @retval false Success
117 @retval true Error
118*/
119 static DEFINE_BOOL_METHOD(
121};
122
124 public:
125 /**
126 Process a global_variables event
127
128 @param [in] data Event specific data
129
130 @returns Status of processing the event
131 @retval false Success
132 @retval true Error
133 */
134 static DEFINE_BOOL_METHOD(
136};
137
139 public:
140 /**
141 Process a start-up event
142
143 @param [in] data Event specific data
144
145 @returns Status of processing the event
146 @retval false Success
147 @retval true Error
148 */
151
152 /**
153 Process a shutdown event
154
155 @param [in] data Event specific data
156
157 @returns Status of processing the event
158 @retval false Success
159 @retval true Error
160 */
163};
164
166 public:
167 /**
168 Process a command event
169
170 @param [in] data Event specific data
171
172 @returns Status of processing the event
173 @retval false Success
174 @retval true Error
175 */
178};
179
181 public:
182 /**
183 Process a query event
184
185 @param [in] data Event specific data
186
187 @returns Status of processing the event
188 @retval false Success
189 @retval true Error
190 */
192 (const mysql_event_tracking_query_data *data));
193};
194
196 public:
197 /**
198 Process a stored program event
199
200 @param [in] data Event specific data
201
202 @returns Status of processing the event
203 @retval false Success
204 @retval true Error
205 */
206 static DEFINE_BOOL_METHOD(
208};
209
211 public:
212 /**
213 Process a authentication event
214
215 @param [in] data Event specific data
216
217 @returns Status of processing the event
218 @retval false Success
219 @retval true Error
220 */
221 static DEFINE_BOOL_METHOD(
223};
224
226 public:
227 /**
228 Process a message event
229
230 @param [in] data Event specific data
231
232 @returns Status of processing the event
233 @retval false Success
234 @retval true Error
235 */
238};
239#endif // !SQL_SERVER_COMPONENT_MYSQL_SERVER_EVENT_TRACKING_BRIDGE_IMP
Definition: mysql_server_event_tracking_bridge_imp.h:210
static mysql_service_status_t notify(const mysql_event_tracking_authentication_data *data) noexcept
Process a authentication event.
Definition: mysql_server_event_tracking_bridge_imp.cc:861
Definition: mysql_server_event_tracking_bridge_imp.h:165
static mysql_service_status_t notify(const mysql_event_tracking_command_data *data) noexcept
Process a command event.
Definition: mysql_server_event_tracking_bridge_imp.cc:917
Definition: mysql_server_event_tracking_bridge_imp.h:79
static mysql_service_status_t notify(const mysql_event_tracking_connection_data *data) noexcept
Process a connection event.
Definition: mysql_server_event_tracking_bridge_imp.cc:947
Definition: mysql_server_event_tracking_bridge_imp.h:64
static mysql_service_status_t notify(const mysql_event_tracking_general_data *data) noexcept
Process an general audit event.
Definition: mysql_server_event_tracking_bridge_imp.cc:991
Definition: mysql_server_event_tracking_bridge_imp.h:123
static mysql_service_status_t notify(const mysql_event_tracking_global_variable_data *data) noexcept
Process a global_variables event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1053
Definition: mysql_server_event_tracking_bridge_imp.h:138
static mysql_service_status_t notify_startup(const mysql_event_tracking_startup_data *data) noexcept
Process a start-up event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1123
static mysql_service_status_t notify_shutdown(const mysql_event_tracking_shutdown_data *data) noexcept
Process a shutdown event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1085
Definition: mysql_server_event_tracking_bridge_imp.h:225
static mysql_service_status_t notify(const mysql_event_tracking_message_data *data) noexcept
Process a message event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1150
Definition: mysql_server_event_tracking_bridge_imp.h:94
static mysql_service_status_t notify(mysql_event_tracking_parse_data *data) noexcept
Process a parse event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1207
Definition: mysql_server_event_tracking_bridge_imp.h:180
static mysql_service_status_t notify(const mysql_event_tracking_query_data *data) noexcept
Process a query event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1268
Definition: mysql_server_event_tracking_bridge_imp.h:195
static mysql_service_status_t notify(const mysql_event_tracking_stored_program_data *data) noexcept
Process a stored program event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1306
Definition: mysql_server_event_tracking_bridge_imp.h:108
static mysql_service_status_t notify(const mysql_event_tracking_table_access_data *data) noexcept
Process a table access event.
Definition: mysql_server_event_tracking_bridge_imp.cc:1337
Authentication event tracking.
Command event tracking.
Connection event tracking.
General event tracking.
Globalvariable access event tracking.
Program lifecycle event tracking.
Message event tracking.
Parse event tracking.
Query event tracking.
Stored program execute event tracking.
Table access event tracking.
const mysql_service_event_tracking_global_variable_t * srv_event_tracking_global_variable
Definition: mysql_server_event_tracking_bridge_imp.cc:634
const mysql_service_event_tracking_message_t * srv_event_tracking_message
Definition: mysql_server_event_tracking_bridge_imp.cc:636
const mysql_service_event_tracking_lifecycle_t * srv_event_tracking_lifecycle
Definition: mysql_server_event_tracking_bridge_imp.cc:635
const mysql_service_event_tracking_parse_t * srv_event_tracking_parse
Definition: mysql_server_event_tracking_bridge_imp.cc:637
const mysql_service_event_tracking_stored_program_t * srv_event_tracking_stored_program
Definition: mysql_server_event_tracking_bridge_imp.cc:639
const mysql_service_event_tracking_query_t * srv_event_tracking_query
Definition: mysql_server_event_tracking_bridge_imp.cc:638
const mysql_service_event_tracking_general_t * srv_event_tracking_general
Definition: mysql_server_event_tracking_bridge_imp.cc:632
const mysql_service_event_tracking_table_access_t * srv_event_tracking_table_access
Definition: mysql_server_event_tracking_bridge_imp.cc:641
const mysql_service_event_tracking_command_t * srv_event_tracking_command
Definition: mysql_server_event_tracking_bridge_imp.cc:629
const mysql_service_event_tracking_connection_t * srv_event_tracking_connection
Definition: mysql_server_event_tracking_bridge_imp.cc:630
const mysql_service_event_tracking_authentication_t * srv_event_tracking_authentication
Definition: mysql_server_event_tracking_bridge_imp.cc:627
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
Structure for Authentication event tracking.
Definition: event_tracking_authentication_defs.h:79
Structure for Command event tracking.
Definition: event_tracking_command_defs.h:55
Structure for Connection event tracking.
Definition: event_tracking_connection_defs.h:60
Structure for General event tracking.
Definition: event_tracking_general_defs.h:59
Structure for Global variable event tracking.
Definition: event_tracking_global_variable_defs.h:50
Structure for Message event tracking.
Definition: event_tracking_message_defs.h:86
Structure for the Parse event tracking.
Definition: event_tracking_parse_defs.h:68
Structure for Query event tracking.
Definition: event_tracking_query_defs.h:59
Structure for Shutdown event tracking.
Definition: event_tracking_lifecycle_defs.h:87
Structure for Startup event tracking.
Definition: event_tracking_lifecycle_defs.h:49
Structure for Stored program event tracking.
Definition: event_tracking_stored_program_defs.h:51
Structure for Table access event tracking.
Definition: event_tracking_table_access_defs.h:59