MySQL 8.3.0
Source Code Documentation
Rpl_global_filter Class Reference

The class is a Rpl_filter representing global replication filters, with a vector that references all Rpl_pfs_filter objects used to represent P_S.replication_applier_global_filters table. More...

#include <rpl_filter.h>

Inheritance diagram for Rpl_global_filter:
[legend]

Public Member Functions

 Rpl_global_filter ()=default
 
 ~Rpl_global_filter () override=default
 
uint get_filter_count ()
 Used only by replication performance schema indices to get the count of global replication filters. More...
 
Rpl_pfs_filterget_filter_at_pos (uint pos)
 Used only by replication performance schema indices to get the global replication filter at the position 'pos' from the rpl_pfs_filter_vec vector. More...
 
void reset_pfs_view ()
 This member function is called every time the rules of the global replication filter are changed. More...
 
- Public Member Functions inherited from Rpl_filter
 Rpl_filter ()
 
virtual ~Rpl_filter ()
 
 Rpl_filter (Rpl_filter const &)
 
Rpl_filteroperator= (Rpl_filter const &)
 
bool tables_ok (const char *db, Table_ref *tables)
 
bool db_ok (const char *db, bool need_increase_counter=true)
 
bool db_ok_with_wild_table (const char *db)
 
bool is_on ()
 
bool is_empty ()
 Check if the replication filter is empty or not. More...
 
int copy_global_replication_filters ()
 Copy global replication filters to its per-channel replication filters if there are no per-channel replication filters and there are global filters on the filter type on channel creation. More...
 
bool is_rewrite_empty ()
 
int build_do_table_hash ()
 
int build_ignore_table_hash ()
 
int add_string_list (I_List< i_string > *list, const char *spec)
 
int add_string_pair_list (I_List< i_string_pair > *list, const char *key, const char *val)
 
int add_do_table_array (const char *table_spec)
 
int add_ignore_table_array (const char *table_spec)
 
int add_wild_do_table (const char *table_spec)
 
int add_wild_ignore_table (const char *table_spec)
 
int set_do_db (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_ignore_db (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_do_table (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_ignore_table (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_wild_do_table (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_wild_ignore_table (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int set_db_rewrite (mem_root_deque< Item * > *list, enum_configured_by configured_by)
 
int parse_filter_list (mem_root_deque< Item * > *item_list, Add_filter func)
 
int parse_filter_list (I_List< i_string > *list, Add_filter add)
 Execute the specified func with elements of the list as input. More...
 
int add_do_db (const char *db_spec)
 
int add_ignore_db (const char *db_spec)
 
int add_db_rewrite (const char *from_db, const char *to_db)
 
void get_do_table (String *str)
 
void get_ignore_table (String *str)
 
void get_wild_do_table (String *str)
 
void get_wild_ignore_table (String *str)
 
const char * get_rewrite_db (const char *db, size_t *new_len)
 
void get_rewrite_db (String *str)
 
I_List< i_string > * get_do_db ()
 
void get_do_db (String *str)
 
I_List< i_string > * get_ignore_db ()
 
void get_ignore_db (String *str)
 
Rpl_filter_statisticsget_rewrite_db_statistics ()
 
void free_string_list (I_List< i_string > *l)
 
void free_string_pair_list (I_List< i_string_pair > *l)
 
void put_filters_into_vector (std::vector< Rpl_pfs_filter > &rpl_pfs_filter_vec, const char *channel_name)
 Put replication filters with attached channel name into a vector. More...
 
void wrlock ()
 Acquire the write lock. More...
 
void rdlock ()
 Acquire the read lock. More...
 
void unlock ()
 Release the lock (whether it is a write or read lock). More...
 
void assert_some_wrlock ()
 Assert that some thread holds the write lock. More...
 
void assert_some_rdlock ()
 Assert that some thread holds the read lock. More...
 
bool is_attached ()
 Check if the relation between the per-channel filter and the channel's Relay_log_info is established. More...
 
void set_attached ()
 Set attached to true when the relation between the per-channel filter and the channel's Relay_log_info is established. More...
 
void reset ()
 

Private Member Functions

Rpl_global_filteroperator= (const Rpl_global_filter &info)
 
 Rpl_global_filter (const Rpl_global_filter &info)
 

Private Attributes

std::vector< Rpl_pfs_filterrpl_pfs_filter_vec
 

Additional Inherited Members

- Public Types inherited from Rpl_filter
typedef int(Rpl_filter::* Add_filter) (char const *)
 
- Public Attributes inherited from Rpl_filter
Rpl_filter_statistics do_table_statistics
 
Rpl_filter_statistics ignore_table_statistics
 
Rpl_filter_statistics wild_do_table_statistics
 
Rpl_filter_statistics wild_ignore_table_statistics
 
Rpl_filter_statistics do_db_statistics
 
Rpl_filter_statistics ignore_db_statistics
 
Rpl_filter_statistics rewrite_db_statistics
 

Detailed Description

The class is a Rpl_filter representing global replication filters, with a vector that references all Rpl_pfs_filter objects used to represent P_S.replication_applier_global_filters table.

There is one instance, rpl_global_filter, created globally for replication global filter. The rpl_global_filter is created when the server is started, destroyed when the server is stopped.

Constructor & Destructor Documentation

◆ Rpl_global_filter() [1/2]

Rpl_global_filter::Rpl_global_filter ( )
default

◆ ~Rpl_global_filter()

Rpl_global_filter::~Rpl_global_filter ( )
overridedefault

◆ Rpl_global_filter() [2/2]

Rpl_global_filter::Rpl_global_filter ( const Rpl_global_filter info)
private

Member Function Documentation

◆ get_filter_at_pos()

Rpl_pfs_filter * Rpl_global_filter::get_filter_at_pos ( uint  pos)

Used only by replication performance schema indices to get the global replication filter at the position 'pos' from the rpl_pfs_filter_vec vector.

Parameters
posthe index in the rpl_pfs_filter_vec vector.
Return values
Rpl_pfs_filterA pointer to a Rpl_pfs_filter, or NULL if it arrived the end of the rpl_pfs_filter_vec.

◆ get_filter_count()

uint Rpl_global_filter::get_filter_count ( )

Used only by replication performance schema indices to get the count of global replication filters.

Return values
thecount of global replication filters.

◆ operator=()

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

◆ reset_pfs_view()

void Rpl_global_filter::reset_pfs_view ( )

This member function is called every time the rules of the global replication filter are changed.

Once that happens the PFS view of global replication filter is recreated.

Member Data Documentation

◆ rpl_pfs_filter_vec

std::vector<Rpl_pfs_filter> Rpl_global_filter::rpl_pfs_filter_vec
private

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