![]() |
MySQL 8.0.40
Source Code Documentation
|
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "my_byteorder.h"
#include "mysql.h"
#include "mysql_trace.h"
Classes | |
struct | test_trace::st_trace_data |
State information maintained by the test trace plugin for each traced connection. More... | |
class | test_trace::Logger |
Namespaces | |
namespace | test_trace |
Macros | |
#define | LOGGER(M) ::test_trace::Logger logger(M); |
#define | LOG(ARGS) |
#define | DUMP(KEY, DATA, LEN) |
#define | OK_PACKET(PKT) (*((const byte *)PKT) == 0x00) |
#define | ERR_PACKET(PKT) (*((const byte *)PKT) == 0xFF) |
#define | EOF_PACKET(PKT) (*((const byte *)PKT) == 0xFE) |
#define | FILE_REQUEST(PKT) (*((const byte *)PKT) == 0xFB) |
#define | protocol_stage_chk_ev_declare(S) |
#define | protocol_stage_check(S) |
#define | NEXT_STAGE(S) |
Typedefs | |
typedef unsigned char | test_trace::byte |
Variables | |
static tracing_start_callback | test_trace::trace_start |
static tracing_stop_callback | test_trace::trace_stop |
static trace_event_handler | test_trace::trace_event |
struct st_mysql_client_plugin_TRACE | test_trace_plugin |
static bool | test_trace::logger_enabled = false |
static Logger | test_trace::logger |
The "top-level" logger used when no connection context is given. More... | |
static bool | test_trace::opt_crash = false |
Global flag telling if test trace plugin should crash if it detects incorrect protocol flow (unexpected stage or invalid event for the current stage). More... | |
If WITH_TEST_TRACE_PLUGIN build option was checked when building libmysql then this plugin is built into client library (no plugin loading required).
The plugin follows the protocol flow based on the trace events reported to it. If MYSQL_TEST_TRACE_DEBUG environment variable is non-zero then it logs information about received trace events and reports if a particular event is invalid.
If MYSQL_TEST_TRACE_CRASH environment variable is set to something else than 0 then the plugin will crash if an invalid trace event was reported to it.
#define DUMP | ( | KEY, | |
DATA, | |||
LEN | |||
) |
#define EOF_PACKET | ( | PKT | ) | (*((const byte *)PKT) == 0xFE) |
#define ERR_PACKET | ( | PKT | ) | (*((const byte *)PKT) == 0xFF) |
#define FILE_REQUEST | ( | PKT | ) | (*((const byte *)PKT) == 0xFB) |
#define LOG | ( | ARGS | ) |
#define LOGGER | ( | M | ) | ::test_trace::Logger logger(M); |
#define NEXT_STAGE | ( | S | ) |
#define OK_PACKET | ( | PKT | ) | (*((const byte *)PKT) == 0x00) |
#define protocol_stage_check | ( | S | ) |
#define protocol_stage_chk_ev_declare | ( | S | ) |
struct st_mysql_client_plugin_TRACE test_trace_plugin |