MySQL  8.0.21
Source Code Documentation
semisync_slave_plugin.cc File Reference
#include <mysql.h>
#include <mysqld_error.h>
#include <stdlib.h>
#include <sys/types.h>
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "plugin/semisync/semisync_slave.h"

Functions

static int repl_semi_apply_slave (Binlog_relay_IO_param *, Trans_param *, int &)
 
static int repl_semi_reset_slave (Binlog_relay_IO_param *)
 
static int repl_semi_slave_request_dump (Binlog_relay_IO_param *param, uint32)
 
static int repl_semi_slave_read_event (Binlog_relay_IO_param *, const char *packet, unsigned long len, const char **event_buf, unsigned long *event_len)
 
static int repl_semi_slave_queue_event (Binlog_relay_IO_param *param, const char *, unsigned long, uint32)
 
static int repl_semi_slave_io_start (Binlog_relay_IO_param *param)
 
static int repl_semi_slave_io_end (Binlog_relay_IO_param *param)
 
int repl_semi_slave_sql_start (Binlog_relay_IO_param *)
 
static int repl_semi_slave_sql_stop (Binlog_relay_IO_param *, bool)
 
static void fix_rpl_semi_sync_slave_enabled (MYSQL_THD, SYS_VAR *, void *ptr, const void *val)
 
static void fix_rpl_semi_sync_trace_level (MYSQL_THD, SYS_VAR *, void *ptr, const void *val)
 
static MYSQL_SYSVAR_BOOL (enabled, rpl_semi_sync_slave_enabled, PLUGIN_VAR_OPCMDARG, "Enable semi-synchronous replication slave (disabled by default). ", nullptr, &fix_rpl_semi_sync_slave_enabled, 0)
 
static MYSQL_SYSVAR_ULONG (trace_level, rpl_semi_sync_slave_trace_level, PLUGIN_VAR_OPCMDARG, "The tracing level for semi-sync replication.", nullptr, &fix_rpl_semi_sync_trace_level, 32, 0, ~0UL, 1)
 
static int semi_sync_slave_plugin_init (void *p)
 
static int semi_sync_slave_plugin_deinit (void *p)
 
 mysql_declare_plugin (semi_sync_slave)
 

Variables

ReplSemiSyncSlaverepl_semisync = nullptr
 
bool semi_sync_need_reply = false
 
static const mysql_service_registry_treg_srv = nullptr
 
const mysql_service_log_builtins_tlog_bi = nullptr
 accessor built-ins More...
 
const mysql_service_log_builtins_string_tlog_bs = nullptr
 string built-ins More...
 
static SYS_VARsemi_sync_slave_system_vars []
 
static SHOW_VAR semi_sync_slave_status_vars []
 
Binlog_relay_IO_observer relay_io_observer
 
struct Mysql_replication semi_sync_slave_plugin
 
 mysql_declare_plugin_end
 

Function Documentation

◆ fix_rpl_semi_sync_slave_enabled()

static void fix_rpl_semi_sync_slave_enabled ( MYSQL_THD  ,
SYS_VAR ,
void *  ptr,
const void *  val 
)
static

◆ fix_rpl_semi_sync_trace_level()

static void fix_rpl_semi_sync_trace_level ( MYSQL_THD  ,
SYS_VAR ,
void *  ptr,
const void *  val 
)
static

◆ mysql_declare_plugin()

mysql_declare_plugin ( semi_sync_slave  )

◆ MYSQL_SYSVAR_BOOL()

static MYSQL_SYSVAR_BOOL ( enabled  ,
rpl_semi_sync_slave_enabled  ,
PLUGIN_VAR_OPCMDARG  ,
"Enable semi-synchronous replication slave (disabled by default). "  ,
nullptr  ,
fix_rpl_semi_sync_slave_enabled,
 
)
static

◆ MYSQL_SYSVAR_ULONG()

static MYSQL_SYSVAR_ULONG ( trace_level  ,
rpl_semi_sync_slave_trace_level  ,
PLUGIN_VAR_OPCMDARG  ,
"The tracing level for semi-sync replication."  ,
nullptr  ,
fix_rpl_semi_sync_trace_level,
32  ,
,
0UL,
 
)
static

◆ repl_semi_apply_slave()

static int repl_semi_apply_slave ( Binlog_relay_IO_param ,
Trans_param ,
int &   
)
static

◆ repl_semi_reset_slave()

static int repl_semi_reset_slave ( Binlog_relay_IO_param )
static

◆ repl_semi_slave_io_end()

static int repl_semi_slave_io_end ( Binlog_relay_IO_param param)
static

◆ repl_semi_slave_io_start()

static int repl_semi_slave_io_start ( Binlog_relay_IO_param param)
static

◆ repl_semi_slave_queue_event()

static int repl_semi_slave_queue_event ( Binlog_relay_IO_param param,
const char *  ,
unsigned  long,
uint32   
)
static

◆ repl_semi_slave_read_event()

static int repl_semi_slave_read_event ( Binlog_relay_IO_param ,
const char *  packet,
unsigned long  len,
const char **  event_buf,
unsigned long *  event_len 
)
static

◆ repl_semi_slave_request_dump()

static int repl_semi_slave_request_dump ( Binlog_relay_IO_param param,
uint32   
)
static

◆ repl_semi_slave_sql_start()

int repl_semi_slave_sql_start ( Binlog_relay_IO_param )

◆ repl_semi_slave_sql_stop()

static int repl_semi_slave_sql_stop ( Binlog_relay_IO_param ,
bool   
)
static

◆ semi_sync_slave_plugin_deinit()

static int semi_sync_slave_plugin_deinit ( void *  p)
static

◆ semi_sync_slave_plugin_init()

static int semi_sync_slave_plugin_init ( void *  p)
static

Variable Documentation

◆ log_bi

accessor built-ins

accessor built-ins

◆ log_bs

string built-ins

◆ mysql_declare_plugin_end

mysql_declare_plugin_end

◆ reg_srv

const mysql_service_registry_t* reg_srv = nullptr
static

◆ relay_io_observer

Binlog_relay_IO_observer relay_io_observer
Initial value:
= {
}
struct Binlog_relay_IO_observer Binlog_relay_IO_observer
Observes and extends the service of slave IO thread.
static int repl_semi_slave_sql_stop(Binlog_relay_IO_param *, bool)
Definition: semisync_slave_plugin.cc:151
static int repl_semi_slave_io_start(Binlog_relay_IO_param *param)
Definition: semisync_slave_plugin.cc:141
int repl_semi_slave_sql_start(Binlog_relay_IO_param *)
Definition: semisync_slave_plugin.cc:149
static int repl_semi_slave_queue_event(Binlog_relay_IO_param *param, const char *, unsigned long, uint32)
Definition: semisync_slave_plugin.cc:127
static int repl_semi_slave_read_event(Binlog_relay_IO_param *, const char *packet, unsigned long len, const char **event_buf, unsigned long *event_len)
Definition: semisync_slave_plugin.cc:115
static int repl_semi_reset_slave(Binlog_relay_IO_param *)
Definition: semisync_slave_plugin.cc:55
static int repl_semi_apply_slave(Binlog_relay_IO_param *, Trans_param *, int &)
Definition: semisync_slave_plugin.cc:49
static int repl_semi_slave_io_end(Binlog_relay_IO_param *param)
Definition: semisync_slave_plugin.cc:145
static int repl_semi_slave_request_dump(Binlog_relay_IO_param *param, uint32)
Definition: semisync_slave_plugin.cc:60

◆ repl_semisync

ReplSemiSyncSlave* repl_semisync = nullptr

◆ semi_sync_need_reply

bool semi_sync_need_reply = false

◆ semi_sync_slave_plugin

struct Mysql_replication semi_sync_slave_plugin
Initial value:
= {
#define MYSQL_REPLICATION_INTERFACE_VERSION
Definition: plugin.h:747

◆ semi_sync_slave_status_vars

SHOW_VAR semi_sync_slave_status_vars[]
static
Initial value:
= {
{"Rpl_semi_sync_slave_status", (char *)&rpl_semi_sync_slave_status,
{nullptr, nullptr, SHOW_BOOL, SHOW_SCOPE_GLOBAL},
}
Definition: status_var.h:31
char rpl_semi_sync_slave_status
Definition: semisync_slave.cc:35
Definition: status_var.h:69

◆ semi_sync_slave_system_vars

SYS_VAR* semi_sync_slave_system_vars[]
static
Initial value:
= {
MYSQL_SYSVAR(trace_level),
nullptr,
}
bool enabled
true if enabled.
Definition: buf0dblwr.cc:81
#define MYSQL_SYSVAR(name)
Definition: plugin.h:281