summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.h
diff options
context:
space:
mode:
authorAndrei Elkin <andrei.elkin@oracle.com>2012-04-21 13:24:39 +0300
committerAndrei Elkin <andrei.elkin@oracle.com>2012-04-21 13:24:39 +0300
commit14de6de946d78dc2c5674d7d1e27edc170e5de6b (patch)
tree5f529072426678936974bb7abecd548dc5af7004 /sql/rpl_rli.h
parentdcb5071b1906d76b4c61d3125ddc7368f3ee8c4f (diff)
parent49e484c8cd2e362e843bbd5d756422cc7e2686d3 (diff)
downloadmariadb-git-14de6de946d78dc2c5674d7d1e27edc170e5de6b.tar.gz
merge bug11754117-45670 fixes from 5.1.
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r--sql/rpl_rli.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index 660a98b1213..dceeec9e777 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -388,6 +388,41 @@ public:
*/
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.