summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-07-12 14:36:20 +0200
committerunknown <knielsen@knielsen-hq.org>2013-07-12 14:36:20 +0200
commitba4b937af2e3c9118071b1279bc39b6febca73a9 (patch)
treead2cf72470e8a031ae5ce0b3f7568cca0faf5340 /sql/rpl_rli.h
parent6d5f237e091ca7aa4fdd52c186af11fffc80b1c2 (diff)
downloadmariadb-git-ba4b937af2e3c9118071b1279bc39b6febca73a9.tar.gz
MDEV-4506: Parallel replication: Intermediate commit
Move the deferred event stuff from Relay_log_info to rpl_group_info to make it thread safe for parallel replication.
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r--sql/rpl_rli.h71
1 files changed, 36 insertions, 35 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 294f2ba885a..07ce0600d94 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -403,41 +403,6 @@ public:
The timestamp is set and reset in @c sql_slave_killed().
*/
time_t last_event_start_time;
-
- /*
- A container to hold on Intvar-, Rand-, Uservar- log-events in case
- the slave is configured with table filtering rules.
- The withhold events are executed when their parent Query destiny is
- determined for execution as well.
- */
- Deferred_log_events *deferred_events;
-
- /*
- State of the container: true stands for IRU events gathering,
- false does for execution, either deferred or direct.
- */
- bool deferred_events_collecting;
-
- /*
- Returns true if the argument event resides in the containter;
- more specifically, the checking is done against the last added event.
- */
- bool is_deferred_event(Log_event * ev)
- {
- return deferred_events_collecting ? deferred_events->is_last(ev) : false;
- };
- /* The general cleanup that slave applier may need at the end of query. */
- inline void cleanup_after_query()
- {
- if (deferred_events)
- deferred_events->rewind();
- };
- /* The general cleanup that slave applier may need at the end of session. */
- void cleanup_after_session()
- {
- if (deferred_events)
- delete deferred_events;
- };
/**
Helper function to do after statement completion.
@@ -581,6 +546,7 @@ public:
private:
+ /* ToDo: This must be moved to rpl_group_info. */
uint32 m_flags;
/*
@@ -645,6 +611,41 @@ struct rpl_group_info
rpl_group_info(Relay_log_info *rli_);
~rpl_group_info() { };
+
+ /*
+ A container to hold on Intvar-, Rand-, Uservar- log-events in case
+ the slave is configured with table filtering rules.
+ The withhold events are executed when their parent Query destiny is
+ determined for execution as well.
+ */
+ Deferred_log_events *deferred_events;
+
+ /*
+ State of the container: true stands for IRU events gathering,
+ false does for execution, either deferred or direct.
+ */
+ bool deferred_events_collecting;
+
+ /*
+ Returns true if the argument event resides in the containter;
+ more specifically, the checking is done against the last added event.
+ */
+ bool is_deferred_event(Log_event * ev)
+ {
+ return deferred_events_collecting ? deferred_events->is_last(ev) : false;
+ };
+ /* The general cleanup that slave applier may need at the end of query. */
+ inline void cleanup_after_query()
+ {
+ if (deferred_events)
+ deferred_events->rewind();
+ };
+ /* The general cleanup that slave applier may need at the end of session. */
+ void cleanup_after_session()
+ {
+ if (deferred_events)
+ delete deferred_events;
+ };
};