MySQL 9.1.0
Source Code Documentation
wrapper_functions.h File Reference

Contains wrapper functions for memory allocation and deallocation. More...

#include "my_config.h"
#include "my_sys.h"
#include "mysql/service_mysql_alloc.h"
#include "my_dbug.h"

Go to the source code of this file.

Namespaces

namespace  mysql
 
namespace  mysql::binlog
 
namespace  mysql::binlog::event
 The namespace contains classes representing events that can occur in a replication stream.
 

Macros

#define HAVE_MYSYS   1
 
#define BAPI_ASSERT(x)   assert(x)
 
#define BAPI_PRINT(name, params)   DBUG_PRINT(name, params)
 
#define BAPI_ENTER(x)   DBUG_ENTER(x)
 
#define BAPI_RETURN(x)   DBUG_RETURN(x)
 
#define BAPI_TRACE   DBUG_TRACE
 
#define BAPI_VOID_RETURN   DBUG_VOID_RETURN
 
#define BAPI_LOG(x, y)   DBUG_LOG(x, y)
 
#define BAPI_VAR(v)   DBUG_VAR(v)
 

Functions

char * mysql::binlog::event::strndup (const char *s, size_t n)
 The strndup() function returns a pointer to a new string which is a duplicate of the string s, but it only copies at most n bytes. More...
 
const char * mysql::binlog::event::bapi_strndup (const char *destination, size_t n)
 This is a wrapper function, and returns a pointer to a new string which is a duplicate of the input string. More...
 
void * mysql::binlog::event::bapi_memdup (const void *source, size_t len)
 This is a wrapper function, and returns a pointer to a new memory with the contents copied from the input memory pointer, up to a given length. More...
 
void * mysql::binlog::event::bapi_malloc (size_t size, int flags)
 This is a wrapper function in order to allocate memory from the heap in the binlogevent library. More...
 
void mysql::binlog::event::bapi_free (void *ptr)
 This is a wrapper function in order to free the memory allocated from the heap in the binlogevent library. More...
 

Variables

PSI_memory_key key_memory_log_event
 

Detailed Description

Contains wrapper functions for memory allocation and deallocation.

This includes generic functions to be called from the binlogevent library, which call the appropriate corresponding function, depending on whether the library is compiled independently, or with the MySQL server.

Macro Definition Documentation

◆ BAPI_ASSERT

#define BAPI_ASSERT (   x)    assert(x)

◆ BAPI_ENTER

#define BAPI_ENTER (   x)    DBUG_ENTER(x)

◆ BAPI_LOG

#define BAPI_LOG (   x,
 
)    DBUG_LOG(x, y)

◆ BAPI_PRINT

#define BAPI_PRINT (   name,
  params 
)    DBUG_PRINT(name, params)

◆ BAPI_RETURN

#define BAPI_RETURN (   x)    DBUG_RETURN(x)

◆ BAPI_TRACE

#define BAPI_TRACE   DBUG_TRACE

◆ BAPI_VAR

#define BAPI_VAR (   v)    DBUG_VAR(v)

◆ BAPI_VOID_RETURN

#define BAPI_VOID_RETURN   DBUG_VOID_RETURN

◆ HAVE_MYSYS

#define HAVE_MYSYS   1

Variable Documentation

◆ key_memory_log_event

PSI_memory_key key_memory_log_event
extern