24#ifndef PLUGIN_TRACE_INCLUDED
25#define PLUGIN_TRACE_INCLUDED
111#define PROTOCOL_STAGE_LIST(X) \
112 protocol_stage_##X(CONNECTING) protocol_stage_##X(WAIT_FOR_INIT_PACKET) \
113 protocol_stage_##X(AUTHENTICATE) protocol_stage_##X(SSL_NEGOTIATION) \
114 protocol_stage_##X(READY_FOR_COMMAND) \
115 protocol_stage_##X(WAIT_FOR_PACKET) \
116 protocol_stage_##X(WAIT_FOR_RESULT) \
117 protocol_stage_##X(WAIT_FOR_FIELD_DEF) \
118 protocol_stage_##X(WAIT_FOR_ROW) \
119 protocol_stage_##X(FILE_REQUEST) \
120 protocol_stage_##X(WAIT_FOR_PS_DESCRIPTION) \
121 protocol_stage_##X(WAIT_FOR_PARAM_DEF) \
122 protocol_stage_##X(DISCONNECTED)
168#define TRACE_EVENT_LIST(X) \
169 trace_event_##X(ERROR) trace_event_##X(CONNECTING) trace_event_##X( \
170 CONNECTED) trace_event_##X(DISCONNECTED) \
171 trace_event_##X(SEND_SSL_REQUEST) trace_event_##X(SSL_CONNECT) \
172 trace_event_##X(SSL_CONNECTED) trace_event_##X(INIT_PACKET_RECEIVED) \
173 trace_event_##X(AUTH_PLUGIN) trace_event_##X(SEND_AUTH_RESPONSE) \
174 trace_event_##X(SEND_AUTH_DATA) \
175 trace_event_##X(AUTHENTICATED) \
176 trace_event_##X(SEND_COMMAND) \
177 trace_event_##X(SEND_FILE) \
178 trace_event_##X(READ_PACKET) \
179 trace_event_##X(PACKET_RECEIVED) \
180 trace_event_##X(PACKET_SENT)
224#define protocol_stage_enum(X) PROTOCOL_STAGE_##X,
228#define trace_event_enum(X) TRACE_EVENT_##X,
258 MYSQL *connection_handle,
274 MYSQL *connection_handle,
#define MYSQL_CLIENT_PLUGIN_HEADER
Definition: client_plugin.h:100
int() trace_event_handler(struct st_mysql_client_plugin_TRACE *self, void *plugin_data, MYSQL *connection_handle, enum protocol_stage stage, enum trace_event event, struct st_trace_event_args args)
Trace plugin trace_event() method.
Definition: plugin_trace.h:293
struct st_mysql_client_plugin_TRACE * trace_plugin
The global trace_plugin pointer.
Definition: mysql_trace.cc:69
const char * trace_event_name(enum trace_event ev)
Definition: mysql_trace.cc:204
#define TRACE_EVENT_LIST(X)
Definition: plugin_trace.h:168
const char * protocol_stage_name(enum protocol_stage stage)
Definition: mysql_trace.cc:192
trace_event
Definition: plugin_trace.h:230
protocol_stage
Definition: plugin_trace.h:226
void *() tracing_start_callback(struct st_mysql_client_plugin_TRACE *self, MYSQL *connection_handle, enum protocol_stage stage)
Trace plugin tracing_start() method.
Definition: plugin_trace.h:257
void() tracing_stop_callback(struct st_mysql_client_plugin_TRACE *self, MYSQL *connection_handle, void *plugin_data)
Trace plugin tracing_stop() method.
Definition: plugin_trace.h:273
#define PROTOCOL_STAGE_LIST(X)
Definition: plugin_trace.h:111
required string event
Definition: replication_group_member_actions.proto:32
T plugin_data(st_plugin_int **ref)
Definition: sql_plugin_ref.h:92
Definition: plugin_trace.h:299
tracing_stop_callback * tracing_stop
Definition: plugin_trace.h:302
trace_event_handler * trace_event
Definition: plugin_trace.h:303
MYSQL_CLIENT_PLUGIN_HEADER tracing_start_callback * tracing_start
Definition: plugin_trace.h:301
Some trace events have additional arguments.
Definition: plugin_trace.h:213
const unsigned char * hdr
Definition: plugin_trace.h:216
size_t hdr_len
Definition: plugin_trace.h:217
const unsigned char * pkt
Definition: plugin_trace.h:218
int cmd
Definition: plugin_trace.h:215
size_t pkt_len
Definition: plugin_trace.h:219
const char * plugin_name
Definition: plugin_trace.h:214