MySQL 8.3.0
Source Code Documentation
client_extensions_macros.h File Reference

helper macros to deal with MYSQL options More...

Go to the source code of this file.

Macros

#define ALLOCATE_EXTENSIONS(OPTS)
 
#define ENSURE_EXTENSIONS_PRESENT(OPTS)
 
#define EXTENSION_SET_STRING(OPTS, X, STR)
 
#define SET_OPTION(opt_var, arg)
 
#define EXTENSION_SET_SSL_STRING(OPTS, X, STR, mode)
 

Variables

PSI_memory_key key_memory_mysql_options
 
PSI_memory_key key_memory_MYSQL
 

Detailed Description

helper macros to deal with MYSQL options

Macro Definition Documentation

◆ ALLOCATE_EXTENSIONS

#define ALLOCATE_EXTENSIONS (   OPTS)
Value:
(OPTS)->extension = (struct st_mysql_options_extention *)my_malloc( \
PSI_memory_key key_memory_mysql_options
Definition: client.cc:164
#define MY_WME
Definition: my_sys.h:127
#define MY_ZEROFILL
Definition: my_sys.h:140
#define MYF(v)
Definition: my_inttypes.h:96
void * my_malloc(PSI_memory_key key, size_t size, int flags)
Allocates size bytes of memory.
Definition: my_memory.cc:56
Definition: sql_common.h:169

◆ ENSURE_EXTENSIONS_PRESENT

#define ENSURE_EXTENSIONS_PRESENT (   OPTS)
Value:
do { \
if (!(OPTS)->extension) ALLOCATE_EXTENSIONS(OPTS); \
} while (0)
#define ALLOCATE_EXTENSIONS(OPTS)
Definition: client_extensions_macros.h:34

◆ EXTENSION_SET_SSL_STRING

#define EXTENSION_SET_SSL_STRING (   OPTS,
  X,
  STR,
  mode 
)
Value:
do { \
EXTENSION_SET_STRING(OPTS, X, static_cast<const char *>(STR)); \
if ((OPTS)->extension->X) (OPTS)->extension->ssl_mode = mode; \
} while (0)
mode
Definition: file_handle.h:59
#define STR(s)
Definition: rest_connection_pool_plugin.cc:153
#define X(b)
Definition: xcom_base.cc:9160

◆ EXTENSION_SET_STRING

#define EXTENSION_SET_STRING (   OPTS,
  X,
  STR 
)
Value:
do { \
if ((OPTS)->extension) \
my_free((OPTS)->extension->X); \
(OPTS)->extension->X = \
((STR) != nullptr) \
: NULL; \
} while (0)
char * my_strdup(PSI_memory_key key, const char *from, myf_t flags)
Definition: my_malloc.cc:547
#define NULL
Definition: types.h:54

◆ SET_OPTION

#define SET_OPTION (   opt_var,
  arg 
)
Value:
do { \
if (mysql->options.opt_var) my_free(mysql->options.opt_var); \
mysql->options.opt_var = \
} while (0)
void my_free(void *ptr)
Frees the memory pointed by the ptr.
Definition: my_memory.cc:80
Definition: instrumented_condition_variable.h:31
Definition: options.cc:56

Variable Documentation

◆ key_memory_MYSQL

PSI_memory_key key_memory_MYSQL
extern

◆ key_memory_mysql_options

PSI_memory_key key_memory_mysql_options
extern