1 #ifndef MYSQL_SERVICE_THD_ALLOC_INCLUDED
30 #ifndef MYSQL_ABI_CHECK
46 void *(*thd_alloc_func)(MYSQL_THD,
unsigned int);
47 void *(*thd_calloc_func)(MYSQL_THD,
unsigned int);
48 char *(*thd_strdup_func)(MYSQL_THD,
const char *);
49 char *(*thd_strmake_func)(MYSQL_THD,
const char *,
unsigned int);
50 void *(*thd_memdup_func)(MYSQL_THD,
const void*,
unsigned int);
52 const char *,
unsigned int, int);
55 #ifdef MYSQL_DYNAMIC_PLUGIN
57 #define thd_alloc(thd,size) (thd_alloc_service->thd_alloc_func((thd), (size)))
59 #define thd_calloc(thd,size) (thd_alloc_service->thd_calloc_func((thd), (size)))
61 #define thd_strdup(thd,str) (thd_alloc_service->thd_strdup_func((thd), (str)))
63 #define thd_strmake(thd,str,size) \
64 (thd_alloc_service->thd_strmake_func((thd), (str), (size)))
66 #define thd_memdup(thd,str,size) \
67 (thd_alloc_service->thd_memdup_func((thd), (str), (size)))
69 #define thd_make_lex_string(thd, lex_str, str, size, allocate_lex_string) \
70 (thd_alloc_service->thd_make_lex_string_func((thd), (lex_str), (str), \
71 (size), (allocate_lex_string)))
95 char *
thd_strdup(MYSQL_THD thd,
const char *str);
103 void *
thd_memdup(MYSQL_THD thd,
const void* str,
unsigned int size);
119 const char *str,
unsigned int size,
120 int allocate_lex_string);
128 #define MYSQL_SERVICE_THD_ALLOC_INCLUDED