MySQL 8.0.40
Source Code Documentation
|
A wrapper of class String, for storing query or trace. More...
Public Member Functions | |
Buffer () | |
size_t | alloced_length () const |
size_t | length () const |
void | prealloc () |
pro-actively extend buffer if soon short of space More... | |
char * | c_ptr_safe () |
const char * | ptr () const |
const CHARSET_INFO * | charset () const |
void | set_charset (const CHARSET_INFO *charset) |
void | append (const char *str, size_t length) |
Like String::append() More... | |
void | append (const char *str) |
void | append_escaped (const char *str, size_t length) |
Like append() but escapes certain characters for string values to be JSON-compliant. More... | |
void | append (char chr) |
size_t | get_allowed_mem_size () const |
size_t | get_missing_bytes () const |
void | set_allowed_mem_size (size_t a) |
Private Attributes | |
size_t | allowed_mem_size |
allowed memory size for this String More... | |
size_t | missing_bytes |
how many bytes could not be added More... | |
String | string_buf |
A wrapper of class String, for storing query or trace.
Any memory allocation error in this class is reported by my_error(), see OOM_HANDLING in opt_trace.h.
|
inline |
|
inline |
void anonymous_namespace{opt_trace.cc}::Buffer::append | ( | char | chr | ) |
|
inline |
void anonymous_namespace{opt_trace.cc}::Buffer::append | ( | const char * | str, |
size_t | length | ||
) |
Like String::append()
str | String, in this instance's charset |
length | length of string |
void anonymous_namespace{opt_trace.cc}::Buffer::append_escaped | ( | const char * | str, |
size_t | length | ||
) |
Like append()
but escapes certain characters for string values to be JSON-compliant.
str | String in UTF8 |
length | length of string |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void anonymous_namespace{opt_trace.cc}::Buffer::prealloc | ( | ) |
pro-actively extend buffer if soon short of space
|
inline |
|
inline |
|
inline |
|
private |
allowed memory size for this String
|
private |
how many bytes could not be added
|
private |