MySQL 9.1.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:166
#define MY_WME
Definition: my_sys.h:130
#define MY_ZEROFILL
Definition: my_sys.h:143
#define MYF(v)
Definition: my_inttypes.h:97
void * my_malloc(PSI_memory_key key, size_t size, int flags)
Allocates size bytes of memory.
Definition: my_memory.cc:57
Definition: sql_common.h:170

◆ 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:35

◆ 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:61
#define X(b)
Definition: xcom_base.cc:9161

◆ 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:548
#define NULL
Definition: types.h:55

◆ 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:81
Definition: instrumented_condition_variable.h:32
Definition: options.cc:57

Variable Documentation

◆ key_memory_MYSQL

PSI_memory_key key_memory_MYSQL
extern

◆ key_memory_mysql_options

PSI_memory_key key_memory_mysql_options
extern