MySQL 8.3.0
Source Code Documentation
s_mysql_mysql_audit_print_service_double_data_source Struct Reference

Audit print service allows to obtain data of the double type associated with the THD object, which keeps various data of the user session. More...

#include <mysql_audit_print_service_double_data_source.h>

Public Attributes

mysql_service_status_t(* get )(THD *thd, my_h_string name, double *out)
 Get data value. More...
 

Detailed Description

Audit print service allows to obtain data of the double type associated with the THD object, which keeps various data of the user session.

It also allows to obtain data not necessarily bound with the user session.

Currently, following data is supported:

  • Query time ("query_time") Query execution time [seconds].
  • Rows sent ("rows_sent") Row count sent to the client as a result.
  • Rows examined ("rows_examined") Row count accessed during the query.
  • Bytes received ("bytes_received") Byte count received from the client.
  • Bytes sent ("bytes_sent") Byte count sent to the client.

Initialization

The service can be instantiated using the registry service with the "mysql_audit_print_service_double_data_source" name.

my_service<SERVICE_TYPE(mysql_audit_print_service_double_data_source)>
svc("mysql_audit_print_service_double_data_source", registry);
if (svc.is_valid()) {
// The service is ready to be used
}
Wraps my_h_service struct conforming ABI into RAII C++ object with ability to cast to desired service...
Definition: my_service.h:34
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:75
const mysql_service_registry_t * mysql_plugin_registry_acquire()
Returns a new reference to the "registry" service.
Definition: plugin_registry_service.cc:46

Query Time

Query Time represents query execution time in seconds.

double value;
svc->get(m_thd, "query_time", &value);

Member Data Documentation

◆ get

mysql_service_status_t(* s_mysql_mysql_audit_print_service_double_data_source::get) (THD *thd, my_h_string name, double *out)

Get data value.

Parameters
thdSession THD object.
nameName of the data value to be retrieved.
[out]outOut value pointer. Must not be nullptr.
Returns
Return values
FALSESucceeded.
TRUEFailed.

The documentation for this struct was generated from the following file: