MySQL 8.4.2
Source Code Documentation
|
Helper class to keep string data in MEM_ROOT before passing to Item_string. More...
#include <opt_explain_format.h>
Public Member Functions | |
mem_root_str () | |
void | cleanup () |
bool | is_empty () |
bool | set (const char *str_arg) |
bool | set (const String &s) |
bool | set (const char *str_arg, size_t length_arg) |
Make a copy of the string in MEM_ROOT. More... | |
void | set (Lazy *x) |
Save expression for further evaluation. More... | |
void | set_const (const char *str_arg) |
Make a copy of string constant. More... | |
void | set_const (const char *str_arg, size_t length_arg) |
Static Public Member Functions | |
static char * | strndup_root (MEM_ROOT *root, const char *str, size_t len) |
Public Attributes | |
const char * | str |
size_t | length |
Lazy * | deferred |
encapsulated expression to evaluate it later (on demand) More... | |
Helper class to keep string data in MEM_ROOT before passing to Item_string.
Since Item_string constructors doesn't copy input string parameter data in the most cases, those input strings must have the same lifetime as Item_string objects, i.e. lifetime of MEM_ROOT. This class allocates input parameters for Item_string objects in MEM_ROOT.
|
inline |
|
inline |
bool qep_row::mem_root_str::is_empty | ( | ) |
|
inline |
bool qep_row::mem_root_str::set | ( | const char * | str_arg, |
size_t | length_arg | ||
) |
Make a copy of the string in MEM_ROOT.
str_arg | string to copy |
length_arg | input string length |
|
inline |
|
inline |
Save expression for further evaluation.
x | Expression |
|
inline |
Make a copy of string constant.
Variant of set() usable when the str_arg argument lives longer than the mem_root_str instance.
|
inline |
|
inlinestatic |
Lazy* qep_row::mem_root_str::deferred |
encapsulated expression to evaluate it later (on demand)
size_t qep_row::mem_root_str::length |
const char* qep_row::mem_root_str::str |