1#ifndef MYSQL_SERVICE_THD_ALLOC_INCLUDED
38#ifndef MYSQL_ABI_CHECK
43#define MYSQL_THD THD *
51 char *(*thd_strmake_func)(
MYSQL_THD,
const char *, size_t);
52 void *(*thd_memdup_func)(
MYSQL_THD,
const void *, size_t);
54 const char *, size_t, int);
57#ifdef MYSQL_DYNAMIC_PLUGIN
59#define thd_alloc(thd, size) (thd_alloc_service->thd_alloc_func((thd), (size)))
61#define thd_calloc(thd, size) \
62 (thd_alloc_service->thd_calloc_func((thd), (size)))
64#define thd_strdup(thd, str) (thd_alloc_service->thd_strdup_func((thd), (str)))
66#define thd_strmake(thd, str, size) \
67 (thd_alloc_service->thd_strmake_func((thd), (str), (size)))
69#define thd_memdup(thd, str, size) \
70 (thd_alloc_service->thd_memdup_func((thd), (str), (size)))
72#define thd_make_lex_string(thd, lex_str, str, size, allocate_lex_string) \
73 (thd_alloc_service->thd_make_lex_string_func((thd), (lex_str), (str), \
74 (size), (allocate_lex_string)))
123 int allocate_lex_string);
127#define MYSQL_SERVICE_THD_ALLOC_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1105
size_t size(const char *const c)
Definition: base64.h:46
#define MYSQL_THD
Definition: service_thd_alloc.h:43
struct thd_alloc_service_st * thd_alloc_service
char * thd_strdup(MYSQL_THD thd, const char *str)
Definition: sql_thd_api.cc:633
void * thd_calloc(MYSQL_THD thd, size_t size)
Definition: sql_thd_api.cc:631
MYSQL_LEX_STRING * thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str, const char *str, size_t size, int allocate_lex_string)
Create a LEX_STRING in this connection's local memory pool.
Definition: sql_thd_api.cc:641
char * thd_strmake(MYSQL_THD thd, const char *str, size_t size)
Definition: sql_thd_api.cc:637
void * thd_memdup(MYSQL_THD thd, const void *str, size_t size)
Definition: sql_thd_api.cc:650
void * thd_alloc(MYSQL_THD thd, size_t size)
Allocate memory in the connection's local memory pool.
Definition: sql_thd_api.cc:629
Definition: mysql_lex_string.h:35
Definition: service_thd_alloc.h:47