MySQL 8.4.2
Source Code Documentation
Rpl_info Class Referenceabstract

#include <rpl_info.h>

Inheritance diagram for Rpl_info:
[legend]

Public Member Functions

 ~Rpl_info () override
 
void set_rpl_info_handler (Rpl_info_handler *param_handler)
 Sets the persistency component/handler. More...
 
Rpl_info_handlerget_rpl_info_handler ()
 Gets the persistency component/handler. More...
 
enum_return_check check_info () const
 
int remove_info ()
 
int clean_info ()
 
bool is_transactional () const
 
bool update_is_transactional ()
 
char * get_description_info () const
 
bool copy_info (Rpl_info_handler *from, Rpl_info_handler *to)
 
uint get_internal_id () const
 
char * get_channel () const
 
virtual bool set_info_search_keys (Rpl_info_handler *to)=0
 To search in the slave repositories, each slave info object (mi, rli or worker) should use a primary key. More...
 
- Public Member Functions inherited from Slave_reporting_capability
 Slave_reporting_capability (char const *thread_name)
 Constructor. More...
 
virtual void report (loglevel level, int err_code, const char *msg,...) const
 Writes a message and, if it's an error message, to Last_Error (which will be displayed by SHOW REPLICA STATUS). More...
 
virtual void report (loglevel level, int err_code, const Gtid_specification *gtid_next, const char *msg,...) const
 
void va_report (loglevel level, int err_code, const char *prefix_msg, const char *msg, va_list v_args) const
 
void clear_error ()
 Clear errors. More...
 
int has_temporary_error (THD *thd, uint error_arg=0, bool *silent=nullptr) const
 Check if the current error is of temporary nature or not. More...
 
Error const & last_error () const
 
bool is_error () const
 
virtual const char * get_for_channel_str (bool upper_case) const =0
 
virtual ~Slave_reporting_capability ()=0
 

Public Attributes

mysql_mutex_t data_lock
 
mysql_mutex_t run_lock
 
mysql_mutex_t sleep_lock
 
mysql_mutex_t info_thd_lock
 
mysql_cond_t data_cond
 
mysql_cond_t start_cond
 
mysql_cond_t stop_cond
 
mysql_cond_t sleep_cond
 
PSI_mutex_keykey_info_run_lock
 
PSI_mutex_keykey_info_data_lock
 
PSI_mutex_keykey_info_sleep_lock
 
PSI_mutex_keykey_info_thd_lock
 
PSI_mutex_keykey_info_data_cond
 
PSI_mutex_keykey_info_start_cond
 
PSI_mutex_keykey_info_stop_cond
 
PSI_mutex_keykey_info_sleep_cond
 
THDinfo_thd
 
bool inited
 
std::atomic< bool > abort_slave
 
std::atomic< uint > slave_running
 
std::atomic< ulong > slave_run_id
 
std::atomic< bool > atomic_is_stopping {false}
 
- Public Attributes inherited from Slave_reporting_capability
mysql_mutex_t err_lock
 lock used to synchronize m_last_error on 'SHOW REPLICA STATUS' More...
 

Protected Member Functions

 Rpl_info (const char *type, PSI_mutex_key *param_key_info_run_lock, PSI_mutex_key *param_key_info_data_lock, PSI_mutex_key *param_key_info_sleep_lock, PSI_mutex_key *param_key_info_thd_lock, PSI_mutex_key *param_key_info_data_cond, PSI_mutex_key *param_key_info_start_cond, PSI_mutex_key *param_key_info_stop_cond, PSI_mutex_key *param_key_info_sleep_cond, uint param_id, const char *param_channel)
 
- Protected Member Functions inherited from Slave_reporting_capability
virtual void do_report (loglevel level, int err_code, const char *msg, va_list v_args) const
 
virtual void do_report (loglevel level, int err_code, const Gtid_specification *gtid_next, const char *msg, va_list v_args) const
 

Protected Attributes

Rpl_info_handlerhandler
 Pointer to the repository's handler. More...
 
uint internal_id
 Uniquely and internally identifies an info entry (.e.g. More...
 
char channel [CHANNEL_NAME_LENGTH+1] = {0}
 Every slave info object acts on a particular channel in Multisource Replication. More...
 
- Protected Attributes inherited from Slave_reporting_capability
Error m_last_error
 Last error produced by the I/O or SQL thread respectively. More...
 

Private Member Functions

virtual bool read_info (Rpl_info_handler *from)=0
 
virtual bool write_info (Rpl_info_handler *to)=0
 
 Rpl_info (const Rpl_info &info)
 
Rpl_infooperator= (const Rpl_info &info)
 

Constructor & Destructor Documentation

◆ ~Rpl_info()

Rpl_info::~Rpl_info ( )
override

◆ Rpl_info() [1/2]

Rpl_info::Rpl_info ( const char *  type,
PSI_mutex_key param_key_info_run_lock,
PSI_mutex_key param_key_info_data_lock,
PSI_mutex_key param_key_info_sleep_lock,
PSI_mutex_key param_key_info_thd_lock,
PSI_mutex_key param_key_info_data_cond,
PSI_mutex_key param_key_info_start_cond,
PSI_mutex_key param_key_info_stop_cond,
PSI_mutex_key param_key_info_sleep_cond,
uint  param_id,
const char *  param_channel 
)
protected

◆ Rpl_info() [2/2]

Rpl_info::Rpl_info ( const Rpl_info info)
private

Member Function Documentation

◆ check_info()

enum_return_check Rpl_info::check_info ( ) const
inline

◆ clean_info()

int Rpl_info::clean_info ( )
inline

◆ copy_info()

bool Rpl_info::copy_info ( Rpl_info_handler from,
Rpl_info_handler to 
)
inline

◆ get_channel()

char * Rpl_info::get_channel ( ) const
inline

◆ get_description_info()

char * Rpl_info::get_description_info ( ) const
inline

◆ get_internal_id()

uint Rpl_info::get_internal_id ( ) const
inline

◆ get_rpl_info_handler()

Rpl_info_handler * Rpl_info::get_rpl_info_handler ( )
inline

Gets the persistency component/handler.

Returns
the handler if there is one.

◆ is_transactional()

bool Rpl_info::is_transactional ( ) const
inline

◆ operator=()

Rpl_info & Rpl_info::operator= ( const Rpl_info info)
private

◆ read_info()

virtual bool Rpl_info::read_info ( Rpl_info_handler from)
privatepure virtual

Implemented in Master_info, Relay_log_info, and Slave_worker.

◆ remove_info()

int Rpl_info::remove_info ( )
inline

◆ set_info_search_keys()

virtual bool Rpl_info::set_info_search_keys ( Rpl_info_handler to)
pure virtual

To search in the slave repositories, each slave info object (mi, rli or worker) should use a primary key.

This function sets the field values of the slave info objects with the search information, which is nothing but PK in mysql slave info tables. Ex: field_value[23]="channel_name" in the master info object.

Currently, used only for TABLE repository.

Implemented in Master_info, Relay_log_info, and Slave_worker.

◆ set_rpl_info_handler()

void Rpl_info::set_rpl_info_handler ( Rpl_info_handler param_handler)
inline

Sets the persistency component/handler.

Parameters
[in]param_handlerPointer to the handler.

◆ update_is_transactional()

bool Rpl_info::update_is_transactional ( )
inline

◆ write_info()

virtual bool Rpl_info::write_info ( Rpl_info_handler to)
privatepure virtual

Implemented in Master_info, Relay_log_info, and Slave_worker.

Member Data Documentation

◆ abort_slave

std::atomic<bool> Rpl_info::abort_slave

◆ atomic_is_stopping

std::atomic<bool> Rpl_info::atomic_is_stopping {false}

◆ channel

char Rpl_info::channel[CHANNEL_NAME_LENGTH+1] = {0}
protected

Every slave info object acts on a particular channel in Multisource Replication.

◆ data_cond

mysql_cond_t Rpl_info::data_cond

◆ data_lock

mysql_mutex_t Rpl_info::data_lock

◆ handler

Rpl_info_handler* Rpl_info::handler
protected

Pointer to the repository's handler.

◆ info_thd

THD* Rpl_info::info_thd

◆ info_thd_lock

mysql_mutex_t Rpl_info::info_thd_lock

◆ inited

bool Rpl_info::inited

◆ internal_id

uint Rpl_info::internal_id
protected

Uniquely and internally identifies an info entry (.e.g.

a row or file). This information is completely transparent to users and is used only during startup to retrieve information from the repositories.

◆ key_info_data_cond

PSI_mutex_key* Rpl_info::key_info_data_cond

◆ key_info_data_lock

PSI_mutex_key * Rpl_info::key_info_data_lock

◆ key_info_run_lock

PSI_mutex_key* Rpl_info::key_info_run_lock

◆ key_info_sleep_cond

PSI_mutex_key * Rpl_info::key_info_sleep_cond

◆ key_info_sleep_lock

PSI_mutex_key * Rpl_info::key_info_sleep_lock

◆ key_info_start_cond

PSI_mutex_key * Rpl_info::key_info_start_cond

◆ key_info_stop_cond

PSI_mutex_key * Rpl_info::key_info_stop_cond

◆ key_info_thd_lock

PSI_mutex_key * Rpl_info::key_info_thd_lock

◆ run_lock

mysql_mutex_t Rpl_info::run_lock

◆ slave_run_id

std::atomic<ulong> Rpl_info::slave_run_id

◆ slave_running

std::atomic<uint> Rpl_info::slave_running

◆ sleep_cond

mysql_cond_t Rpl_info::sleep_cond

◆ sleep_lock

mysql_mutex_t Rpl_info::sleep_lock

◆ start_cond

mysql_cond_t Rpl_info::start_cond

◆ stop_cond

mysql_cond_t Rpl_info::stop_cond

The documentation for this class was generated from the following files: