![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
#include <rpl_async_conn_failover_table_operations.h>
Public Member Functions | |
| Rpl_async_conn_failover_table_operations (enum thr_lock_type lock_type=TL_WRITE) | |
| Construction.  More... | |
| virtual | ~Rpl_async_conn_failover_table_operations ()=default | 
| std::tuple< bool, std::string > | add_source (const std::string &channel, const std::string &host, uint port, const std::string &network_namespace, uint weight, const std::string &managed_name) | 
| Insert row for a unmanaged sender on replication_asynchronous_connection_failover table, and send stored table data to its group replication group members.  More... | |
| std::tuple< bool, std::string > | add_managed (const std::string &channel, const std::string &host, uint port, const std::string &network_namespace, const std::string &managed_type, const std::string &managed_name, uint primary_weight, uint secondary_weight) | 
| Insert row on replication_asynchronous_connection_failover_managed and replication_asynchronous_connection_failover tables, and send stored table data to its group replication group members.  More... | |
| std::tuple< bool, std::string > | delete_source (const std::string &channel, const std::string &host, uint port, const std::string &network_namespace) | 
| Delete row for a unmanaged sender on replication_asynchronous_connection_failover table.  More... | |
| std::tuple< bool, std::string > | delete_managed (const std::string &channel, const std::string &managed_name) | 
| Delete row on replication_asynchronous_connection_failover_managed table and all its sources on replication_asynchronous_connection_failover table.  More... | |
| bool | reset () | 
| Delete all rows on replication_asynchronous_connection_failover_managed and replication_asynchronous_connection_failover tables, and delete its respective rows on replication_group_configuration_version table.  More... | |
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > | read_source_rows_for_channel (std::string channel_name) | 
| Read all sources for a channel.  More... | |
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > | read_source_rows_for_channel_and_managed_name (std::string channel_name, std::string managed_name) | 
| Real all sources for a channel and a managed name.  More... | |
| bool | read_managed_rows_for_channel (std::string channel_name, std::vector< RPL_FAILOVER_MANAGED_TUPLE > &rows) | 
| Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.  More... | |
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > | read_source_all_rows () | 
| Read all sources.  More... | |
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > | read_source_random_rows () | 
| Get all sources using random scan (ha_rnd_next) to fetch all the rows.  More... | |
| bool | read_managed_random_rows (std::vector< RPL_FAILOVER_MANAGED_TUPLE > &rows) | 
| Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.  More... | |
Static Public Member Functions | |
| static std::tuple< bool, std::string > | add_source_skip_send (const std::string &channel, const std::string &host, uint port, const std::string &network_namespace, uint weight, const std::string &managed_name, Rpl_sys_table_access &table_op) | 
| Insert row for a unmanaged sender on replication_asynchronous_connection_failover table.  More... | |
| static std::tuple< bool, std::string > | add_managed_skip_send (const std::string &channel, const std::string &managed_type, const std::string &managed_name, const Json_wrapper &wrapper, Rpl_sys_table_access &table_op) | 
| Insert row on replication_asynchronous_connection_failover_managed table.  More... | |
| static std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > | read_source_all_rows_internal (Rpl_sys_table_access &table_op) | 
| Read all sources.  More... | |
| static bool | read_managed_random_rows_internal (Rpl_sys_table_access &table_op, std::vector< RPL_FAILOVER_MANAGED_JSON_TUPLE > &rows) | 
| Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_JSON_TUPLE tuple.  More... | |
| static bool | read_managed_random_rows_internal (Rpl_sys_table_access &table_op, std::vector< RPL_FAILOVER_MANAGED_TUPLE > &rows) | 
| Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.  More... | |
| template<class TUP > | |
| static void | get_data (Rpl_sys_table_access &table_op, TUP &rows) | 
| Get stored data in table.  More... | |
Static Public Attributes | |
| static const MYSQL_LEX_CSTRING | Primary_weight_key | 
| static const MYSQL_LEX_CSTRING | Secondary_weight_key | 
Static Private Member Functions | |
| template<class T > | |
| static std::tuple< bool, std::string > | execute_handler_func_skip_send (const std::vector< uint > &field_index, const std::vector< std::string > &field_name, const T &field_value, std::function< void(Rpl_sys_table_access &, bool &, std::string &, uint &, key_part_map &)> func, uint table_index, key_part_map keypart_map, Rpl_sys_table_access &table_op) | 
| A wrapper template function to save/delete data to given table.  More... | |
| template<class T > | |
| static std::tuple< bool, std::string > | execute_handler_func_send (const std::string &db_name, const std::string &table_name, uint num_field, enum thr_lock_type lock_type, const std::vector< uint > &field_index, const std::vector< std::string > &field_name, const T &field_value, std::function< void(Rpl_sys_table_access &, bool &, std::string &, uint &, key_part_map &)> func, uint table_index, key_part_map keypart_map) | 
| A wrapper template function to save/delete data to given table, and send stored table data to its group replication group members.  More... | |
Private Attributes | |
| enum thr_lock_type | m_lock_type | 
| const std::string | m_db {"mysql"} | 
| const std::string | m_table_failover | 
| const uint | m_table_failover_num_field {6} | 
| const std::string | m_table_managed | 
| const uint | m_table_managed_num_field {4} | 
      
  | 
  inline | 
Construction.
| [in] | lock_type | How to lock the table | 
      
  | 
  virtualdefault | 
| std::tuple< bool, std::string > Rpl_async_conn_failover_table_operations::add_managed | ( | const std::string & | channel, | 
| const std::string & | host, | ||
| uint | port, | ||
| const std::string & | network_namespace, | ||
| const std::string & | managed_type, | ||
| const std::string & | managed_name, | ||
| uint | primary_weight, | ||
| uint | secondary_weight | ||
| ) | 
Insert row on replication_asynchronous_connection_failover_managed and replication_asynchronous_connection_failover tables, and send stored table data to its group replication group members.
| [in] | channel | channel | 
| [in] | host | sender host | 
| [in] | port | sender port | 
| [in] | network_namespace | sender network_namespace | 
| [in] | managed_type | Determines the manged group type. | 
| [in] | managed_name | The name of the group which this server belongs to | 
| [in] | primary_weight | weight assigned to the primary | 
| [in] | secondary_weight | weight assigned to the secondary | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
      
  | 
  static | 
Insert row on replication_asynchronous_connection_failover_managed table.
| [in] | channel | channel | 
| [in] | managed_type | Determines the manged group type. | 
| [in] | managed_name | The name of the group which this server belongs to. | 
| [in] | wrapper | contains weight assigned to the primary and secondary member in Json format. | 
| [in] | table_op | Rpl_sys_table_access class object. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
| std::tuple< bool, std::string > Rpl_async_conn_failover_table_operations::add_source | ( | const std::string & | channel, | 
| const std::string & | host, | ||
| uint | port, | ||
| const std::string & | network_namespace, | ||
| uint | weight, | ||
| const std::string & | managed_name | ||
| ) | 
Insert row for a unmanaged sender on replication_asynchronous_connection_failover table, and send stored table data to its group replication group members.
| [in] | channel | channel | 
| [in] | host | sender host | 
| [in] | port | sender port | 
| [in] | network_namespace | sender network_namespace | 
| [in] | weight | sender weight | 
| [in] | managed_name | The name of the group which this server belongs to. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
      
  | 
  static | 
Insert row for a unmanaged sender on replication_asynchronous_connection_failover table.
| [in] | channel | channel | 
| [in] | host | sender host | 
| [in] | port | sender port | 
| [in] | network_namespace | sender network_namespace | 
| [in] | weight | sender weight | 
| [in] | managed_name | The name of the group which this server belongs to. | 
| [in] | table_op | Rpl_sys_table_access class object. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
| std::tuple< bool, std::string > Rpl_async_conn_failover_table_operations::delete_managed | ( | const std::string & | channel, | 
| const std::string & | managed_name | ||
| ) | 
Delete row on replication_asynchronous_connection_failover_managed table and all its sources on replication_asynchronous_connection_failover table.
| [in] | channel | The asynchronous replication channel name | 
| [in] | managed_name | The name of the group which this server belongs to. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
| std::tuple< bool, std::string > Rpl_async_conn_failover_table_operations::delete_source | ( | const std::string & | channel, | 
| const std::string & | host, | ||
| uint | port, | ||
| const std::string & | network_namespace | ||
| ) | 
Delete row for a unmanaged sender on replication_asynchronous_connection_failover table.
| [in] | channel | channel | 
| [in] | host | sender host | 
| [in] | port | sender port | 
| [in] | network_namespace | sender network_namespace | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
      
  | 
  staticprivate | 
A wrapper template function to save/delete data to given table, and send stored table data to its group replication group members.
| [in] | db_name | The database whose table will be used to write/delete data. | 
| [in] | table_name | The table to which data will be written or deleted. | 
| [in] | num_field | The number of fields to be written or match while querying for delete operations. | 
| [in] | lock_type | How to lock the table | 
| [in] | field_index | The list of field's position to be written or match while querying for delete operations. | 
| [in] | field_name | The list of field names of the table. | 
| [in] | field_value | The field values to be written or match while querying for delete operations. | 
| [in] | func | The handler class function to write/delete data. | 
| [in] | table_index | The table index/key position (by default i.e. on position 0, if primary key present is used). | 
| [in] | keypart_map | Which part of key to use. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
      
  | 
  staticprivate | 
A wrapper template function to save/delete data to given table.
| [in] | field_index | The list of field's position to be written or match while querying for delete operations. | 
| [in] | field_name | The list of field names of the table. | 
| [in] | field_value | The field values to be written or match while querying for delete operations. | 
| [in] | func | The handler class function to write/delete data. | 
| [in] | table_index | The table index/key position (by default i.e. on position 0, if primary key present is used). | 
| [in] | keypart_map | Which part of key to use. | 
| [in] | table_op | Rpl_sys_table_access class object. | 
first element of tuple is function return value and determines: false Successful true Error
second element of tuple is error message.
      
  | 
  static | 
Get stored data in table.
| [in] | table_op | Rpl_sys_table_access class object. | 
| [out] | rows | Fetch and store read rows in the tuple. | 
| bool Rpl_async_conn_failover_table_operations::read_managed_random_rows | ( | std::vector< RPL_FAILOVER_MANAGED_TUPLE > & | rows | ) | 
Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.
It uses random scan (ha_rnd_next) to fetch all the rows.
| [out] | rows | return rows read from replication_asynchronous_connection_failover_managed | 
      
  | 
  static | 
Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_JSON_TUPLE tuple.
It uses random scan (ha_rnd_next) to fetch all the rows.
| [in] | table_op | Rpl_sys_table_access class object. | 
| [out] | rows | return rows read from replication_asynchronous_connection_failover_managed | 
      
  | 
  static | 
Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.
It uses random scan (ha_rnd_next) to fetch all the rows.
| [in] | table_op | Rpl_sys_table_access class object. | 
| [out] | rows | return rows read from replication_asynchronous_connection_failover_managed | 
| bool Rpl_async_conn_failover_table_operations::read_managed_rows_for_channel | ( | std::string | channel_name, | 
| std::vector< RPL_FAILOVER_MANAGED_TUPLE > & | rows | ||
| ) | 
Read rows and fields from replication_asynchronous_connection_failover_managed table and returns its details in provided RPL_FAILOVER_MANAGED_TUPLE tuple.
It uses index scan (ha_index_read_idx_map) to fetch rows for the channel name.
| [in] | channel_name | The channel name | 
| [out] | rows | return rows read from replication_asynchronous_connection_failover_managed | 
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > Rpl_async_conn_failover_table_operations::read_source_all_rows | ( | ) | 
Read all sources.
It uses index scan (ha_index_first) to fetch all the rows.
first element of tuple is function return value and determines: false Successful true Error
second element of the tuple is list of return details based on open table and template provided.
      
  | 
  static | 
Read all sources.
It uses index scan (ha_index_first) to fetch all the rows.
| [in] | table_op | Rpl_sys_table_access class object. | 
first element of tuple is function return value and determines: false Successful true Error
second element of the tuple is list of return details based on open table and template provided.
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > Rpl_async_conn_failover_table_operations::read_source_random_rows | ( | ) | 
Get all sources using random scan (ha_rnd_next) to fetch all the rows.
first element of tuple is function return value and determines: false Successful true Error
second element of the tuple is list of return details based on open table and template provided.
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > Rpl_async_conn_failover_table_operations::read_source_rows_for_channel | ( | std::string | channel_name | ) | 
Read all sources for a channel.
It uses index scan (ha_index_read_idx_map) to fetch rows for the channel name.
| [in] | channel_name | The channel name | 
first element of tuple is function return value and determines: false Successful true Error
second element of the tuple is list of return details based on open table and template provided.
| std::tuple< bool, std::vector< RPL_FAILOVER_SOURCE_TUPLE > > Rpl_async_conn_failover_table_operations::read_source_rows_for_channel_and_managed_name | ( | std::string | channel_name, | 
| std::string | managed_name | ||
| ) | 
Real all sources for a channel and a managed name.
It uses index scan (ha_index_read_idx_map) to fetch rows for the channel name and manged name.
| [in] | channel_name | The channel name | 
| [in] | managed_name | The name of the group which this server belongs to. | 
first element of tuple is function return value and determines: false Successful true Error
second element of the tuple is list of return details based on open table and template provided.
| bool Rpl_async_conn_failover_table_operations::reset | ( | void | ) | 
Delete all rows on replication_asynchronous_connection_failover_managed and replication_asynchronous_connection_failover tables, and delete its respective rows on replication_group_configuration_version table.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  static | 
      
  | 
  static |