MySQL 8.4.0
Source Code Documentation
event_tracking_connection_defs.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 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 COMPONENTS_SERVICES_DEFS_EVENT_TRACKING_CONNECTION_DEFS_H
25#define COMPONENTS_SERVICES_DEFS_EVENT_TRACKING_CONNECTION_DEFS_H
26
28
29/**
30 @file mysql/components/services/defs/event_tracking_connection_defs.h
31 Data for connection event tracking.
32*/
33
34/** occurs after authentication phase is completed. */
35#define EVENT_TRACKING_CONNECTION_CONNECT (1 << 0)
36/** occurs after connection is terminated. */
37#define EVENT_TRACKING_CONNECTION_DISCONNECT (1 << 1)
38/** occurs after COM_CHANGE_USER RPC is completed. */
39#define EVENT_TRACKING_CONNECTION_CHANGE_USER (1 << 2)
40/** occurs before authentication. */
41#define EVENT_TRACKING_CONNECTION_PRE_AUTHENTICATE (1 << 3)
42
43#define EVENT_TRACKING_CONNECTION_ALL \
44 EVENT_TRACKING_CONNECTION_CONNECT | EVENT_TRACKING_CONNECTION_DISCONNECT | \
45 EVENT_TRACKING_CONNECTION_CHANGE_USER | \
46 EVENT_TRACKING_CONNECTION_PRE_AUTHENTICATE
47
48/**
49 @typedef mysql_event_tracking_connection_subclass_t
50
51 Events for Connection event tracking.
52*/
54
55/**
56 @struct mysql_event_tracking_connection_data
57
58 Structure for Connection event tracking.
59*/
61 /** Event subclass */
63 /** Current status of the connection */
64 int status;
65 /** Connection id */
67 /** User name of this connection */
69 /** Priv user */
71 /** External user name */
73 /** Proxy user used for the connection */
75 /** Connection host */
77 /** IP of the connection */
79 /**
80 Database name specified at connection time - System charset (defaults to
81 utf8mb4) Please use @ref s_mysql_mysql_charset to obtain charset
82 */
84 /** Connection type:
85 - 0 Undefined
86 - 1 TCP/IP
87 - 2 Socket
88 - 3 Named pipe
89 - 4 SSL
90 - 5 Shared memory
91 */
93};
94
95#endif // !COMPONENTS_SERVICES_DEFS_EVENT_TRACKING_CONNECTION_DEFS_H
Common data used for tracking various types of events.
unsigned long mysql_connection_id
Connection Identifier.
Definition: event_tracking_common_defs.h:46
unsigned long mysql_event_tracking_connection_subclass_t
Events for Connection event tracking.
Definition: event_tracking_connection_defs.h:53
String with length information.
Definition: mysql_string_defs.h:33
Structure for Connection event tracking.
Definition: event_tracking_connection_defs.h:60
mysql_cstring_with_length external_user
External user name.
Definition: event_tracking_connection_defs.h:72
mysql_cstring_with_length priv_user
Priv user.
Definition: event_tracking_connection_defs.h:70
mysql_event_tracking_connection_subclass_t event_subclass
Event subclass.
Definition: event_tracking_connection_defs.h:62
mysql_cstring_with_length host
Connection host.
Definition: event_tracking_connection_defs.h:76
mysql_cstring_with_length database
Database name specified at connection time - System charset (defaults to utf8mb4) Please use s_mysql_...
Definition: event_tracking_connection_defs.h:83
mysql_cstring_with_length proxy_user
Proxy user used for the connection.
Definition: event_tracking_connection_defs.h:74
mysql_cstring_with_length ip
IP of the connection.
Definition: event_tracking_connection_defs.h:78
int status
Current status of the connection.
Definition: event_tracking_connection_defs.h:64
mysql_cstring_with_length user
User name of this connection.
Definition: event_tracking_connection_defs.h:68
mysql_connection_id connection_id
Connection id.
Definition: event_tracking_connection_defs.h:66
int connection_type
Connection type:
Definition: event_tracking_connection_defs.h:92