summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.h
diff options
context:
space:
mode:
authorLixun Peng <P.Linux@163.com>2013-04-16 19:43:28 +0800
committerLixun Peng <P.Linux@163.com>2013-04-16 19:43:28 +0800
commit82eedf4e9745aa570b88b225941120475f9f74c9 (patch)
treec88a6bcc7efd700de4e64af88edb7e3d02f9dd1b /sql/rpl_mi.h
parentaa052eeb1a020b8a198e892a7ca0d8f4a3bcd5f1 (diff)
downloadmariadb-git-82eedf4e9745aa570b88b225941120475f9f74c9.tar.gz
Makeing rpl_filter for each Master_info.
Users can set different repplication filter rules for each replication connection, in my.cnf or command line. But the rules set online will not record in master.info, it means if users restart MySQL, these rules will lose. So if users wantn't their replication filter rules lose, they should write the rules in my.cnf. Users can set rules by 2 ways: 1. Online SET command, "SET connection_name.replication_filter_settings = rules;". 2. In my.cnf, "connection_name.replication_filter_settings = rules". If no connection_name in my.cnf, this rule will apply for ALL replication connection. If no connetion_name in SET statement, this rull will apply for default_connection_name.
Diffstat (limited to 'sql/rpl_mi.h')
-rw-r--r--sql/rpl_mi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index b6a3e7d91b9..64501e96f00 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -21,6 +21,8 @@
#include "rpl_rli.h"
#include "rpl_reporting.h"
#include "my_sys.h"
+#include "rpl_filter.h"
+#include "keycaches.h"
typedef struct st_mysql MYSQL;
@@ -92,6 +94,7 @@ class Master_info : public Slave_reporting_capability
uint32 file_id; /* for 3.23 load data infile */
Relay_log_info rli;
uint port;
+ Rpl_filter* rpl_filter; /* Each replication can set its filter rule*/
/*
to hold checksum alg in use until IO thread has received FD.
Initialized to novalue, then set to the queried from master
@@ -141,6 +144,7 @@ int flush_master_info(Master_info* mi,
bool flush_relay_log_cache,
bool need_lock_relay_log);
int change_master_server_id_cmp(ulong *id1, ulong *id2);
+void copy_filter_setting(Rpl_filter* dst_filter, Rpl_filter* src_filter);
/*
Multi master are handled trough this struct.