MySQL  8.0.16
Source Code Documentation
rpl_msr.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef RPL_MSR_H
24 #define RPL_MSR_H
25 
26 #include "my_config.h"
27 
28 #include <stddef.h>
29 #include <sys/types.h>
30 #include <map>
31 #include <string>
32 #include <utility>
33 #include <vector>
34 
35 #include "my_dbug.h"
36 #include "my_psi_config.h"
37 #include "sql/mysqld.h" // key_rwlock_channel_map_lock
38 #include "sql/rpl_channel_service_interface.h" // enum_channel_type
39 #include "sql/rpl_filter.h"
40 #include "sql/rpl_gtid.h"
41 
43 
44 /**
45  Maps a channel name to it's Master_info.
46 */
47 
48 // Maps a master info object to a channel name
49 typedef std::map<std::string, Master_info *> mi_map;
50 // Maps a channel type to a map of channels of that type.
51 typedef std::map<int, mi_map> replication_channel_map;
52 // Maps a replication filter to a channel name.
53 typedef std::map<std::string, Rpl_filter *> filter_map;
54 
55 /**
56  Class to store all the Master_info objects of a slave
57  to access them in the replication code base or performance
58  schema replication tables.
59 
60  In a Multisourced replication setup, a slave connects
61  to several masters (also called as sources). This class
62  stores the Master_infos where each Master_info belongs
63  to a slave.
64 
65  The important objects for a slave are the following:
66  i) Master_info and Relay_log_info (slave_parallel_workers == 0)
67  ii) Master_info, Relay_log_info and Slave_worker(slave_parallel_workers >0 )
68 
69  Master_info is always assosiated with a Relay_log_info per channel.
70  So, it is enough to store Master_infos and call the corresponding
71  Relay_log_info by mi->rli;
72 
73  This class is not yet thread safe. Any part of replication code that
74  calls this class member function should always lock the channel_map.
75 
76  Only a single global object for a server instance should be created.
77 
78  The two important data structures in this class are
79  i) C++ std map to store the Master_info pointers with channel name as a key.
80  These are the base channel maps.
81  @todo Convert to boost after it's introduction.
82 
83  ii) C++ std map to store the channel maps with a channel type as its key.
84  This map stores slave channel maps, group replication channels or others
85  iii) An array of Master_info pointers to access from performance schema
86  tables. This array is specifically implemented in a way to make
87  a) pfs indices simple i.e a simple integer counter
88  b) To avoid recalibration of data structure if master info is deleted.
89  * Consider the following high level implementation of a pfs table
90  to make a row.
91  @code
92  highlevel_pfs_funciton()
93  {
94  while(replication_table_xxxx.rnd_next())
95  {
96  do stuff;
97  }
98  }
99  @endcode
100  However, we lock channel_map lock for every rnd_next(); There is a gap
101  where an addition/deletion of a channel would rearrange the map
102  making the integer indices of the pfs table point to a wrong value.
103  Either missing a row or duplicating a row.
104 
105  We solve this problem, by using an array exclusively to use in
106  replciation pfs tables, by marking a master_info defeated as 0
107  (i.e NULL). A new master info is added to this array at the
108  first NULL always.
109 */
111  private:
112  /* Maximum number of channels per slave */
113  static const unsigned int MAX_CHANNELS = 256;
114 
115  /* A Map that maps, a channel name to a Master_info grouped by channel type */
117 
118  /* Number of master_infos at the moment*/
120 
121  /**
122  Default_channel for this instance, currently is predefined
123  and cannot be modified.
124  */
125  static const char *default_channel;
127  static const char *group_replication_channel_names[];
128 
129  /**
130  This lock was designed to protect the channel_map from adding or removing
131  master_info objects from the map (adding or removing replication channels).
132  In fact it also acts like the LOCK_active_mi of MySQL 5.6, preventing two
133  replication administrative commands to run in parallel.
134  */
136 
137 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
138 
139  /* Array for replication performance schema related tables */
141 
142 #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
143 
144  /*
145  A empty mi_map to allow Multisource_info::end() to return a
146  valid constant value.
147  */
149 
150  public:
151  /* Constructor for this class.*/
153  /*
154  This class should be a singleton.
155  The assert below is to prevent it to be instantiated more than once.
156  */
157 #ifndef DBUG_OFF
158  static int instance_count = 0;
159  instance_count++;
160  DBUG_ASSERT(instance_count == 1);
161 #endif
162  current_mi_count = 0;
164 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
165  init_rpl_pfs_mi();
166 #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
167 
169 #ifdef HAVE_PSI_INTERFACE
171 #endif
172  );
173  }
174 
175  /* Destructor for this class.*/
177 
178  /**
179  Adds the Master_info object to both replication_channel_map and rpl_pfs_mi
180 
181  @param[in] channel_name channel name
182  @param[in] mi pointer to master info corresponding
183  to this channel
184  @return
185  @retval false succesfully added
186  @retval true couldn't add channel
187  */
188  bool add_mi(const char *channel_name, Master_info *mi);
189 
190  /**
191  Find the master_info object corresponding to a channel explicitly
192  from replication channel_map;
193  Return if it exists, otherwise return 0
194 
195  @param[in] channel_name channel name for the master info object.
196 
197  @return
198  @retval pointer to the master info object if exists
199  in the map. Otherwise, NULL;
200  */
201  Master_info *get_mi(const char *channel_name);
202 
203  /**
204  Return the master_info object corresponding to the default channel.
205  @retval pointer to the master info object if exists.
206  Otherwise, NULL;
207  */
210  return default_channel_mi;
211  }
212 
213  /**
214  Remove the entry corresponding to the channel, from the
215  replication_channel_map and sets index in the multisource_mi to 0;
216  And also delete the {mi, rli} pair corresponding to this channel
217 
218  @param[in] channel_name Name of the channel for a Master_info
219  object which must exist.
220  */
221  void delete_mi(const char *channel_name);
222 
223  /**
224  Get the default channel for this multisourced_slave;
225  */
226  inline const char *get_default_channel() { return default_channel; }
227 
228  /**
229  Get the number of instances of Master_info in the map.
230 
231  @param all If it should count all channels.
232  If false, only slave channels are counted.
233 
234  @return The number of channels or 0 if empty.
235  */
236  inline size_t get_num_instances(bool all = false) {
237  DBUG_ENTER("Multisource_info::get_num_instances");
238 
240 
241  replication_channel_map::iterator map_it;
242 
243  if (all) {
244  size_t count = 0;
245 
246  for (map_it = rep_channel_map.begin(); map_it != rep_channel_map.end();
247  map_it++) {
248  count += map_it->second.size();
249  }
251  } else // Return only the slave channels
252  {
254 
255  if (map_it == rep_channel_map.end())
256  DBUG_RETURN(0);
257  else
258  DBUG_RETURN(map_it->second.size());
259  }
260  }
261 
262  /**
263  Get max channels allowed for this map.
264  */
265  inline uint get_max_channels() { return MAX_CHANNELS; }
266 
267  /**
268  Returns true if the current number of channels in this slave
269  is less than the MAX_CHANNLES
270  */
271  inline bool is_valid_channel_count() {
274  DBUG_EXECUTE_IF("max_replication_channels_exceeded", is_valid = false;);
275  return (is_valid);
276  }
277 
278  /**
279  Returns if a channel name is one of the reserved group replication names
280 
281  @param channel the channel name to test
282  @param is_applier compare only with applier name
283 
284  @return
285  @retval true the name is a reserved name
286  @retval false non reserved name
287  */
288  bool is_group_replication_channel_name(const char *channel,
289  bool is_applier = false);
290 
291  /**
292  Forward iterators to initiate traversing of a map.
293 
294  @todo: Not to expose iterators. But instead to return
295  only Master_infos or create generators when
296  c++11 is introduced.
297  */
298  mi_map::iterator begin(
300  replication_channel_map::iterator map_it;
301  map_it = rep_channel_map.find(channel_type);
302 
303  if (map_it != rep_channel_map.end()) {
304  return map_it->second.begin();
305  }
306 
307  return end(channel_type);
308  }
309 
310  mi_map::iterator end(
312  replication_channel_map::iterator map_it;
313  map_it = rep_channel_map.find(channel_type);
314 
315  if (map_it != rep_channel_map.end()) {
316  return map_it->second.end();
317  }
318 
319  return empty_mi_map.end();
320  }
321 
322  private:
323 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
324 
325  /* Initialize the rpl_pfs_mi array to NULLs */
326  inline void init_rpl_pfs_mi() {
327  for (uint i = 0; i < MAX_CHANNELS; i++) rpl_pfs_mi[i] = 0;
328  }
329 
330  /**
331  Add a master info pointer to the rpl_pfs_mi array at the first
332  NULL;
333 
334  @param[in] mi master info object to be added.
335 
336  @return false if success.Else true.
337  */
339 
340  /**
341  Get the index of the master info corresponding to channel name
342  from the rpl_pfs_mi array.
343  @param[in] channel_name Channel name to get the index from
344 
345  @return index of mi for the channel_name. Else -1;
346  */
347  int get_index_from_rpl_pfs_mi(const char *channel_name);
348 
349  public:
350  /**
351  Used only by replication performance schema indices to get the master_info
352  at the position 'pos' from the rpl_pfs_mi array.
353 
354  @param[in] pos the index in the rpl_pfs_mi array
355 
356  @retval pointer to the master info object at pos 'pos';
357  */
359 #endif /*WITH_PERFSCHEMA_STORAGE_ENGINE */
360 
361  /**
362  Acquire the read lock.
363  */
364  inline void rdlock() { m_channel_map_lock->rdlock(); }
365 
366  /**
367  Acquire the write lock.
368  */
369  inline void wrlock() { m_channel_map_lock->wrlock(); }
370 
371  /**
372  Release the lock (whether it is a write or read lock).
373  */
374  inline void unlock() { m_channel_map_lock->unlock(); }
375 
376  /**
377  Assert that some thread holds either the read or the write lock.
378  */
379  inline void assert_some_lock() const {
381  }
382 
383  /**
384  Assert that some thread holds the write lock.
385  */
386  inline void assert_some_wrlock() const {
388  }
389 };
390 
391 /**
392  The class is a container for all the per-channel filters, both a map of
393  Rpl_filter objects and a list of Rpl_pfs_filter objects.
394  It maintains a filter map which maps a replication filter to a channel
395  name. Which is needed, because replication channels are not created and
396  channel_map is not filled in when these global and per-channel replication
397  filters are evaluated with current code frame.
398  In theory, after instantiating all channels from the repository and throwing
399  all the warnings about the filters configured for non-existent channels, we
400  can forget about its global object rpl_channel_filters and rely only on the
401  global and per channel Rpl_filter objects. But to avoid holding the
402  channel_map.rdlock() when quering P_S.replication_applier_filters table,
403  we keep the rpl_channel_filters. So that we just need to hold the small
404  rpl_channel_filters.rdlock() when quering P_S.replication_applier_filters
405  table. Many operations (RESET SLAVE [FOR CHANNEL], START SLAVE, INIT SLAVE,
406  END SLAVE, CHANGE MASTER TO, FLUSH RELAY LOGS, START CHANNEL, PURGE CHANNEL,
407  and so on) hold the channel_map.wrlock().
408 
409  There is one instance, rpl_channel_filters, created globally for Multisource
410  channel filters. The rpl_channel_filters is created when the server is
411  started, destroyed when the server is stopped.
412 */
414  private:
415  /* Store all replication filters with channel names. */
417  /* Store all Rpl_pfs_filter objects in the channel_to_filter. */
418  std::vector<Rpl_pfs_filter> rpl_pfs_filter_vec;
419  /*
420  This lock was designed to protect the channel_to_filter from reading,
421  adding, or removing its objects from the map. It is used to preventing
422  the following commands to run in parallel:
423  RESET SLAVE ALL [FOR CHANNEL '<channel_name>']
424  CHANGE MASTER TO ... FOR CHANNEL
425  SELECT FROM performance_schema.replication_applier_filters
426 
427  Please acquire a wrlock when modifying the map structure (RESET SLAVE ALL
428  [FOR CHANNEL '<channel_name>'], CHANGE MASTER TO ... FOR CHANNEL).
429  Please acqurie a rdlock when querying existing filter(s) (SELECT FROM
430  performance_schema.replication_applier_filters).
431 
432  Note: To modify the object from the map, please see the protection of
433  m_rpl_filter_lock in Rpl_filter.
434  */
436 
437  public:
438  /**
439  Create a new replication filter and add it into a filter map.
440 
441  @param channel_name A name of a channel.
442 
443  @retval Rpl_filter A pointer to a replication filter, or NULL
444  if we failed to add it into fiter_map.
445  */
446  Rpl_filter *create_filter(const char *channel_name);
447  /**
448  Delete the replication filter from the filter map.
449 
450  @param rpl_filter A pointer to point to a replication filter.
451  */
453  /**
454  Discard all replication filters if they are not attached to channels.
455  */
457  /**
458  discard filters on group replication channels.
459  */
461  /**
462  Get a replication filter of a channel.
463 
464  @param channel_name A name of a channel.
465 
466  @retval Rpl_filter A pointer to a replication filter, or NULL
467  if we failed to add a replication filter
468  into fiter_map when creating it.
469  */
470  Rpl_filter *get_channel_filter(const char *channel_name);
471 
472 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
473 
474  /**
475  This member function is called everytime a filter is created or deleted,
476  or its filter rules are changed. Once that happens the PFS view is
477  recreated.
478  */
479  void reset_pfs_view();
480 
481  /**
482  Used only by replication performance schema indices to get the replication
483  filter at the position 'pos' from the rpl_pfs_filter_vec vector.
484 
485  @param pos the index in the rpl_pfs_filter_vec vector.
486 
487  @retval Rpl_filter A pointer to a Rpl_pfs_filter, or NULL if it
488  arrived the end of the rpl_pfs_filter_vec.
489  */
491  /**
492  Used only by replication performance schema indices to get the count
493  of replication filters from the rpl_pfs_filter_vec vector.
494 
495  @retval the count of the replication filters.
496  */
498 #endif /*WITH_PERFSCHEMA_STORAGE_ENGINE */
499 
500  /**
501  Traverse the filter map, build do_table and ignore_table
502  rules to hashes for every filter.
503 
504  @retval
505  0 OK
506  @retval
507  -1 Error
508  */
510 
511  /* Constructor for this class.*/
514 #ifdef HAVE_PSI_INTERFACE
516 #endif
517  );
518  }
519 
520  /* Destructor for this class. */
522 
523  /**
524  Traverse the filter map and free all filters. Delete all objects
525  in the rpl_pfs_filter_vec vector and then clear the vector.
526  */
527  void clean_up() {
528  /* Traverse the filter map and free all filters */
529  for (filter_map::iterator it = channel_to_filter.begin();
530  it != channel_to_filter.end(); it++) {
531  if (it->second != NULL) {
532  delete it->second;
533  it->second = NULL;
534  }
535  }
536 
537  rpl_pfs_filter_vec.clear();
538  }
539 
540  /**
541  Acquire the write lock.
542  */
543  inline void wrlock() { m_channel_to_filter_lock->wrlock(); }
544 
545  /**
546  Acquire the read lock.
547  */
548  inline void rdlock() { m_channel_to_filter_lock->rdlock(); }
549 
550  /**
551  Release the lock (whether it is a write or read lock).
552  */
553  inline void unlock() { m_channel_to_filter_lock->unlock(); }
554 };
555 
556 /* Global object for multisourced slave. */
558 
559 /* Global object for storing per-channel replication filters */
561 
562 static bool inline is_slave_configured() {
563  /* Server was started with server_id == 0
564  OR
565  failure to load slave info repositories because of repository
566  mismatch i.e Assume slave had a multisource replication with several
567  channels setup with TABLE repository. Then if the slave is restarted
568  with FILE repository, we fail to load any of the slave repositories,
569  including the default channel one.
570  Hence, channel_map.get_default_channel_mi() will return NULL.
571  */
573 }
574 
575 #endif /*RPL_MSR_H*/
Master_info * get_mi(const char *channel_name)
Find the master_info object corresponding to a channel explicitly from replication channel_map; Retur...
Definition: rpl_msr.cc:85
#define DBUG_RETURN(a1)
Definition: my_dbug.h:84
void discard_group_replication_filters()
discard filters on group replication channels.
Definition: rpl_msr.cc:280
Rpl_filter.
Definition: rpl_filter.h:211
void rdlock()
Acquire the read lock.
Definition: rpl_gtid.h:453
t pos
Definition: dbug_analyze.cc:148
~Rpl_channel_filters()
Definition: rpl_msr.h:521
The class Rpl_pfs_filter is introduced to serve the performance_schema.replication_applier_filters ta...
Definition: rpl_filter.h:164
static const char * default_channel
Default_channel for this instance, currently is predefined and cannot be modified.
Definition: rpl_msr.h:125
ssize_t count
Definition: memcached.c:386
bool build_do_and_ignore_table_hashes()
Traverse the filter map, build do_table and ignore_table rules to hashes for every filter...
Definition: rpl_msr.cc:390
bool add_mi(const char *channel_name, Master_info *mi)
Adds the Master_info object to both replication_channel_map and rpl_pfs_mi.
Definition: rpl_msr.cc:40
Checkable_rwlock * m_channel_map_lock
This lock was designed to protect the channel_map from adding or removing master_info objects from th...
Definition: rpl_msr.h:135
mi_map empty_mi_map
Definition: rpl_msr.h:148
void assert_some_lock() const
Assert that some thread holds either the read or the write lock.
Definition: rpl_msr.h:379
void wrlock()
Acquire the write lock.
Definition: rpl_gtid.h:462
Sergei Dialog Client Authentication NULL
Definition: dialog.cc:352
Master_info * default_channel_mi
Definition: rpl_msr.h:126
void clean_up()
Traverse the filter map and free all filters.
Definition: rpl_msr.h:527
bool add_mi_to_rpl_pfs_mi(Master_info *mi)
Add a master info pointer to the rpl_pfs_mi array at the first NULL;.
Definition: rpl_msr.cc:187
void assert_some_wrlock() const
Assert that some thread holds the write lock.
Definition: rpl_gtid.h:526
bool is_valid(const dd::Spatial_reference_system *srs, const Geometry *g, const char *func_name, bool *is_valid) noexcept
Decides if a geometry is valid.
Definition: is_valid.cc:94
void init_rpl_pfs_mi()
Definition: rpl_msr.h:326
Master_info * get_default_channel_mi()
Return the master_info object corresponding to the default channel.
Definition: rpl_msr.h:208
uint get_max_channels()
Get max channels allowed for this map.
Definition: rpl_msr.h:265
static const unsigned int MAX_CHANNELS
Definition: rpl_msr.h:113
uint current_mi_count
Definition: rpl_msr.h:119
Rpl_channel_filters()
Definition: rpl_msr.h:512
void rdlock()
Acquire the read lock.
Definition: rpl_msr.h:548
#define DBUG_EXECUTE_IF(keyword, a1)
Definition: my_dbug.h:100
void delete_filter(Rpl_filter *rpl_filter)
Delete the replication filter from the filter map.
Definition: rpl_msr.cc:257
Rpl_pfs_filter * get_filter_at_pos(uint pos)
Used only by replication performance schema indices to get the replication filter at the position &#39;po...
Definition: rpl_msr.cc:371
Rpl_channel_filters rpl_channel_filters
Definition: rpl_msr.cc:413
void wrlock()
Acquire the write lock.
Definition: rpl_msr.h:369
~Multisource_info()
Definition: rpl_msr.h:176
The class is a container for all the per-channel filters, both a map of Rpl_filter objects and a list...
Definition: rpl_msr.h:413
#define DBUG_ASSERT(A)
Definition: my_dbug.h:128
std::vector< Rpl_pfs_filter > rpl_pfs_filter_vec
Definition: rpl_msr.h:418
void assert_some_wrlock() const
Assert that some thread holds the write lock.
Definition: rpl_msr.h:386
#define DBUG_ENTER(a)
Definition: my_dbug.h:80
void assert_some_lock() const
Assert that some thread holds either the read or the write lock.
Definition: rpl_gtid.h:522
void unlock()
Release the lock (whether it is a write or read lock).
Definition: rpl_gtid.h:473
bool is_group_replication_channel_name(const char *channel, bool is_applier=false)
Returns if a channel name is one of the reserved group replication names.
Definition: rpl_msr.cc:176
void wrlock()
Acquire the write lock.
Definition: rpl_msr.h:543
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
unsigned int uint
Definition: uca-dump.cc:29
static const char * group_replication_channel_names[]
Definition: rpl_msr.h:127
Master_info * rpl_pfs_mi[MAX_CHANNELS]
Definition: rpl_msr.h:140
void rdlock()
Acquire the read lock.
Definition: rpl_msr.h:364
static bool is_slave_configured()
Definition: rpl_msr.h:562
std::map< std::string, Rpl_filter * > filter_map
Definition: rpl_msr.h:53
Class to store all the Master_info objects of a slave to access them in the replication code base or ...
Definition: rpl_msr.h:110
PSI_rwlock_key key_rwlock_channel_map_lock
Definition: mysqld.cc:10192
Master_info * get_mi_at_pos(uint pos)
Used only by replication performance schema indices to get the master_info at the position &#39;pos&#39; from...
Definition: rpl_msr.cc:218
#define HAVE_PSI_INTERFACE
Definition: my_psi_config.h:38
Definition: rpl_mi.h:85
mi_map::iterator end(enum_channel_type channel_type=SLAVE_REPLICATION_CHANNEL)
Definition: rpl_msr.h:310
const char * get_default_channel()
Get the default channel for this multisourced_slave;.
Definition: rpl_msr.h:226
Multisource_info()
Definition: rpl_msr.h:152
Rpl_filter * get_channel_filter(const char *channel_name)
Get a replication filter of a channel.
Definition: rpl_msr.cc:331
int get_index_from_rpl_pfs_mi(const char *channel_name)
Get the index of the master info corresponding to channel name from the rpl_pfs_mi array...
Definition: rpl_msr.cc:205
bool is_valid_channel_count()
Returns true if the current number of channels in this slave is less than the MAX_CHANNLES.
Definition: rpl_msr.h:271
void reset_pfs_view()
This member function is called everytime a filter is created or deleted, or its filter rules are chan...
Definition: rpl_msr.cc:354
void delete_mi(const char *channel_name)
Remove the entry corresponding to the channel, from the replication_channel_map and sets index in the...
Definition: rpl_msr.cc:116
Multisource_info channel_map
Definition: rpl_msr.cc:411
void discard_all_unattached_filters()
Discard all replication filters if they are not attached to channels.
Definition: rpl_msr.cc:298
replication_channel_map rep_channel_map
Definition: rpl_msr.h:116
size_t get_num_instances(bool all=false)
Get the number of instances of Master_info in the map.
Definition: rpl_msr.h:236
Rpl_filter * create_filter(const char *channel_name)
Create a new replication filter and add it into a filter map.
Definition: rpl_msr.cc:228
mi_map::iterator begin(enum_channel_type channel_type=SLAVE_REPLICATION_CHANNEL)
Forward iterators to initiate traversing of a map.
Definition: rpl_msr.h:298
This has the functionality of mysql_rwlock_t, with two differences:
Definition: rpl_gtid.h:429
Checkable_rwlock * m_channel_to_filter_lock
Definition: rpl_msr.h:435
PSI_rwlock_key key_rwlock_channel_to_filter_lock
Definition: mysqld.cc:10196
uint get_filter_count()
Used only by replication performance schema indices to get the count of replication filters from the ...
Definition: rpl_msr.cc:381
std::map< std::string, Master_info * > mi_map
Maps a channel name to it&#39;s Master_info.
Definition: rpl_msr.h:42
void unlock()
Release the lock (whether it is a write or read lock).
Definition: rpl_msr.h:374
enum_channel_type
Types of channels.
Definition: rpl_channel_service_interface.h:49
filter_map channel_to_filter
Definition: rpl_msr.h:416
void unlock()
Release the lock (whether it is a write or read lock).
Definition: rpl_msr.h:553
std::map< int, mi_map > replication_channel_map
Definition: rpl_msr.h:51
Rpl_filter * rpl_filter
Definition: rpl_channel_service_interface.h:50