MySQL 8.4.2
Source Code Documentation
group_replication_priv.h File Reference

Go to the source code of this file.

Namespaces

namespace  gr
 

Typedefs

using gr::Gtid_tsid = mysql::gtid::Tsid
 
using gr::Gtid_tag = mysql::gtid::Tag
 
using gr::Gtid_format = mysql::gtid::Gtid_format
 

Functions

int group_replication_init ()
 Server side initializations. More...
 
my_thread_attr_tget_connection_attrib ()
 Returns the server connection attribute. More...
 
void get_server_parameters (char **hostname, uint *port, char **uuid, unsigned int *server_version, uint *admin_port)
 Returns the server hostname, port and uuid. More...
 
void get_server_main_ssl_parameters (st_server_ssl_variables *server_ssl_variables)
 Returns the server's client-server interface's ssl configuration values. More...
 
void get_server_admin_ssl_parameters (st_server_ssl_variables *server_ssl_variables)
 Returns the server's admin interface's ssl configuration values. More...
 
ulong get_server_id ()
 Returns the server_id. More...
 
ulong get_auto_increment_increment ()
 Returns the server auto_increment_increment. More...
 
ulong get_auto_increment_offset ()
 Returns the server auto_increment_offset. More...
 
void set_auto_increment_increment (ulong auto_increment_increment)
 Set server auto_increment_increment. More...
 
void set_auto_increment_offset (ulong auto_increment_offset)
 Set server auto_increment_offset. More...
 
void get_server_startup_prerequirements (Trans_context_info &requirements)
 Returns a struct containing all server startup information needed to evaluate if one has conditions to proceed executing master-master replication. More...
 
bool get_server_encoded_gtid_executed (uchar **encoded_gtid_executed, size_t *length)
 Returns the server GTID_EXECUTED encoded as a binary string. More...
 
char * encoded_gtid_set_to_string (uchar *encoded_gtid_set, size_t length)
 Returns a text representation of a encoded GTID set. More...
 
rpl_gno get_last_executed_gno (rpl_sidno sidno)
 Return last gno for a given sidno, see Gtid_state::get_last_executed_gno() for details. More...
 
rpl_sidno get_sidno_from_global_tsid_map (const mysql::gtid::Tsid &tsid)
 Return sidno for a given tsid, see Tsid_map::add_tsid() for details. More...
 
const mysql::gtid::Tsidget_tsid_from_global_tsid_map (rpl_sidno sidno)
 Return Tsid for a given sidno on the global_tsid_map. More...
 
void set_slave_thread_options (THD *thd)
 Set slave thread default options. More...
 
void global_thd_manager_add_thd (THD *thd)
 Add thread to Global_THD_manager singleton. More...
 
void global_thd_manager_remove_thd (THD *thd)
 Remove thread from Global_THD_manager singleton. More...
 
const char * get_write_set_algorithm_string (unsigned int algorithm)
 Function that returns the write set extraction algorithm name. More...
 
bool is_gtid_committed (const Gtid &gtid)
 Returns true if the given transaction is committed. More...
 
unsigned long get_replica_max_allowed_packet ()
 Returns the value of replica_max_allowed_packet. More...
 
bool wait_for_gtid_set_committed (const char *gtid_set_text, double timeout, bool update_thd_status)
 Wait until the given Gtid_set is included in @GLOBAL.GTID_EXECUTED. More...
 
unsigned long get_max_replica_max_allowed_packet ()
 
bool is_server_restarting_after_clone ()
 
bool is_server_data_dropped ()
 
void microseconds_to_datetime_str (uint64_t microseconds_since_epoch, char *datetime_str, uint decimal_precision)
 Copy to datetime_str parameter the date in the format 'YYYY-MM-DD hh:mm:ss.ffffff' of the moment in time represented by micro-seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). More...
 

Function Documentation

◆ encoded_gtid_set_to_string()

char * encoded_gtid_set_to_string ( uchar encoded_gtid_set,
size_t  length 
)

Returns a text representation of a encoded GTID set.

Note
Memory allocated to returned pointer must be release by caller.
Parameters
[in]encoded_gtid_setbinary string
[in]lengthbinary string length
Returns
a pointer to text representation of the encoded set

◆ get_auto_increment_increment()

ulong get_auto_increment_increment ( )

Returns the server auto_increment_increment.

Returns
auto_increment_increment

◆ get_auto_increment_offset()

ulong get_auto_increment_offset ( )

Returns the server auto_increment_offset.

Returns
auto_increment_offset

◆ get_connection_attrib()

my_thread_attr_t * get_connection_attrib ( )

Returns the server connection attribute.

Note
This method implementation is on sql_class.cc
Returns
the pthread for the connection attribute.

Returns the server connection attribute.

Return values
Referenceto thread attribute for connection threads

◆ get_last_executed_gno()

rpl_gno get_last_executed_gno ( rpl_sidno  sidno)

Return last gno for a given sidno, see Gtid_state::get_last_executed_gno() for details.

◆ get_max_replica_max_allowed_packet()

unsigned long get_max_replica_max_allowed_packet ( )
Returns
the maximum value of replica_max_allowed_packet.

◆ get_replica_max_allowed_packet()

unsigned long get_replica_max_allowed_packet ( )

Returns the value of replica_max_allowed_packet.

Returns
replica_max_allowed_packet

◆ get_server_admin_ssl_parameters()

void get_server_admin_ssl_parameters ( st_server_ssl_variables server_ssl_variables)

Returns the server's admin interface's ssl configuration values.

Parameters
[out]server_ssl_variablesserver's ssl_variables

◆ get_server_encoded_gtid_executed()

bool get_server_encoded_gtid_executed ( uchar **  encoded_gtid_executed,
size_t *  length 
)

Returns the server GTID_EXECUTED encoded as a binary string.

Note
Memory allocated to encoded_gtid_executed must be release by caller.
Parameters
[out]encoded_gtid_executedbinary string
[out]lengthbinary string length

◆ get_server_id()

ulong get_server_id ( )

Returns the server_id.

Returns
server_id

◆ get_server_main_ssl_parameters()

void get_server_main_ssl_parameters ( st_server_ssl_variables server_ssl_variables)

Returns the server's client-server interface's ssl configuration values.

Parameters
[out]server_ssl_variablesserver's ssl_variables

◆ get_server_parameters()

void get_server_parameters ( char **  hostname,
uint *  port,
char **  uuid,
unsigned int *  server_version,
uint *  admin_port 
)

Returns the server hostname, port and uuid.

Parameters
[out]hostnamehostname
[out]portport
[out]uuiduuid
[out]server_versionserver version
[out]admin_portmysqld admin port

◆ get_server_startup_prerequirements()

void get_server_startup_prerequirements ( Trans_context_info requirements)

Returns a struct containing all server startup information needed to evaluate if one has conditions to proceed executing master-master replication.

Parameters
[out]requirementsrequirements

◆ get_sidno_from_global_tsid_map()

rpl_sidno get_sidno_from_global_tsid_map ( const mysql::gtid::Tsid tsid)

Return sidno for a given tsid, see Tsid_map::add_tsid() for details.

◆ get_tsid_from_global_tsid_map()

const mysql::gtid::Tsid & get_tsid_from_global_tsid_map ( rpl_sidno  sidno)

Return Tsid for a given sidno on the global_tsid_map.

See Tsid_map::sidno_to_tsid() for details.

◆ get_write_set_algorithm_string()

const char * get_write_set_algorithm_string ( unsigned int  algorithm)

Function that returns the write set extraction algorithm name.

Parameters
[in]algorithmThe algorithm value
Returns
the algorithm name

◆ global_thd_manager_add_thd()

void global_thd_manager_add_thd ( THD thd)

Add thread to Global_THD_manager singleton.

Parameters
[in]thdThe thread

◆ global_thd_manager_remove_thd()

void global_thd_manager_remove_thd ( THD thd)

Remove thread from Global_THD_manager singleton.

Parameters
[in]thdThe thread

◆ group_replication_init()

int group_replication_init ( )

Server side initializations.

◆ is_gtid_committed()

bool is_gtid_committed ( const Gtid gtid)

Returns true if the given transaction is committed.

Parameters
[in]gtidThe transaction identifier
Returns
true the transaction is committed false otherwise

◆ is_server_data_dropped()

bool is_server_data_dropped ( )
Returns
if the server already dropped its data when cloning

◆ is_server_restarting_after_clone()

bool is_server_restarting_after_clone ( )
Returns
if the server is restarting after a clone

◆ microseconds_to_datetime_str()

void microseconds_to_datetime_str ( uint64_t  microseconds_since_epoch,
char *  datetime_str,
uint  decimal_precision 
)

Copy to datetime_str parameter the date in the format 'YYYY-MM-DD hh:mm:ss.ffffff' of the moment in time represented by micro-seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

Parameters
[in]microseconds_since_epochmicro-seconds since Epoch.
[out]datetime_strThe string pointer to print at. This function is guaranteed not to write more than MAX_DATE_STRING_REP_LENGTH characters.
[in]decimal_precisiondecimal precision, in the range 0..6

◆ set_auto_increment_increment()

void set_auto_increment_increment ( ulong  auto_increment_increment)

Set server auto_increment_increment.

Parameters
[in]auto_increment_incrementauto-increment increment

◆ set_auto_increment_offset()

void set_auto_increment_offset ( ulong  auto_increment_offset)

Set server auto_increment_offset.

Parameters
[in]auto_increment_offsetauto-increment offset

◆ wait_for_gtid_set_committed()

bool wait_for_gtid_set_committed ( const char *  gtid_set_text,
double  timeout,
bool  update_thd_status 
)

Wait until the given Gtid_set is included in @GLOBAL.GTID_EXECUTED.

Parameters
[in]gtid_set_textGtid_set to wait for.
[in]timeoutThe maximum number of seconds that the function should wait, or 0 to wait indefinitely.
[in]update_thd_statuswhen true updates the stage info with the new wait condition, when false keeps the current stage info.
Return values
falsethe Gtid_set is included in @GLOBAL.GTID_EXECUTED
trueotherwise