MySQL 9.1.0
Source Code Documentation
event_tracking_parse_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_PARSE_DEFS_H
25#define COMPONENTS_SERVICES_DEFS_EVENT_TRACKING_PARSE_DEFS_H
26
28
29/**
30 @file mysql/components/services/defs/event_tracking_parse_defs.h
31 Data for parse event tracking.
32*/
33
34/** occurs before the query parsing. */
35#define EVENT_TRACKING_PARSE_PREPARSE (1 << 0)
36/** occurs after the query parsing. */
37#define EVENT_TRACKING_PARSE_POSTPARSE (1 << 1)
38
39#define EVENT_TRACKING_PARSE_ALL \
40 EVENT_TRACKING_PARSE_PREPARSE | EVENT_TRACKING_PARSE_POSTPARSE
41
42/**
43 @typedef mysql_event_tracking_parse_subclass_t
44
45 Events for Parse event tracking.
46*/
48
49/** Default value of the flag */
50#define EVENT_TRACKING_PARSE_REWRITE_NONE 0
51/** Must be set by a plugin if the query is rewritten. */
52#define EVENT_TRACKING_PARSE_REWRITE_QUERY_REWRITTEN (1 << 0)
53/** set by the server if the query is prepared statement. */
54#define EVENT_TRACKING_PARSE_REWRITE_IS_PREPARED_STATEMENT (1 << 1)
55
56/**
57 @typedef mysql_event_tracking_parse_rewrite_plugin_flag
58
59 Query rewritting flags
60*/
62
63/**
64 @struct mysql_event_tracking_parse_data
65
66 Structure for the Parse event tracking
67*/
69 /** Connection id. */
71
72 /** MYSQL_AUDIT_[PRE|POST]_PARSE event id */
74
75 /** one of FLAG_REWRITE_PLUGIN_* */
77
78 /** input: the original query text */
80
81 /**
82 output: returns the null-terminated
83 rwritten query allocated by my_malloc()
84 */
86};
87
88#endif // !COMPONENTS_SERVICES_DEFS_EVENT_TRACKING_PARSE_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 int mysql_event_tracking_parse_rewrite_plugin_flag
Query rewritting flags.
Definition: event_tracking_parse_defs.h:61
unsigned long mysql_event_tracking_parse_subclass_t
Events for Parse event tracking.
Definition: event_tracking_parse_defs.h:47
String with length information.
Definition: mysql_string_defs.h:33
Structure for the Parse event tracking.
Definition: event_tracking_parse_defs.h:68
mysql_event_tracking_parse_subclass_t event_subclass
MYSQL_AUDIT_[PRE|POST]_PARSE event id.
Definition: event_tracking_parse_defs.h:73
mysql_connection_id connection_id
Connection id.
Definition: event_tracking_parse_defs.h:70
mysql_cstring_with_length * rewritten_query
output: returns the null-terminated rwritten query allocated by my_malloc()
Definition: event_tracking_parse_defs.h:85
mysql_cstring_with_length query
input: the original query text
Definition: event_tracking_parse_defs.h:79
mysql_event_tracking_parse_rewrite_plugin_flag * flags
one of FLAG_REWRITE_PLUGIN_*
Definition: event_tracking_parse_defs.h:76