Service to read the value of a status variable as a string.
More...
#include <mysql_status_variable_reader.h>
Service to read the value of a status variable as a string.
Used approximately as follows:
bool get_global = true;
const char *
name =
"gizmo";
if (!get_global && mysql_service_mysql_current_thread_reader->get(&thd)) {
return nullptr;
}
if (!mysql_service_mysql_status_variable_string->get(thd,
name, get_global,
&
str) &&
str && !mysql_service_mysql_string_converter->convert_to_buffer(
str,
mysql_service_mysql_string_factory->destroy(
str);
}
if (
str) mysql_service_mysql_string_factory->destroy(
str);
#define MYSQL_THD
Definition: backup_page_tracker.h:38
struct my_h_string_imp * my_h_string
The string functions as a service to the mysql_server component.
Definition: mysql_string.h:73
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1077
const std::string charset("charset")
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
bool is_null(poly_thread thread, poly_value value)
Definition: jit_executor_type_conversion.cc:46
case opt name
Definition: sslopt-case.h:29
- See also
- mysql_status_variable_reader_imp
◆ get
Gets the string value of a status variable.
Will read the value of the status variable supplied, convert to a string as needed and store into the out_string parameter as a my_h_string.
- Note
- No status variable values aggregation will be done from the threads to the globals. Will keep the status variable lock while extracting the value.
- Warning
- The function will return an error if you do not supply a session and request the session value.
- Parameters
-
| thd | The THD to operate on or a nullptr to create a temp THD |
| name | The name of the status variable to access. US ASCII |
| get_global | true if the global value of the status variable is required, false if the session one. |
| [out] | out_string | a place to store the value |
- Returns
- Status of the operation
- Return values
-
- See also
- mysql_status_variable_reader_imp::get
The documentation for this struct was generated from the following file: