summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-10-31 14:11:41 +0100
committerunknown <knielsen@knielsen-hq.org>2013-10-31 14:11:41 +0100
commit39df665a3332bd9bfb2529419f534a49cfac388c (patch)
tree0b431c7e00a4ef8344a5fbde2cdac4935ec204b1 /sql/rpl_parallel.h
parent9c8da4ed762a4ad092e23cc07c34212320341ac1 (diff)
downloadmariadb-git-39df665a3332bd9bfb2529419f534a49cfac388c.tar.gz
MDEV-5206: Incorrect slave old-style position in MDEV-4506, parallel replication.
In parallel replication, there are two kinds of events which are executed in different ways. Normal events that are part of event groups/transactions are executed asynchroneously by being queued for a worker thread. Other events like format description and rotate and such are executed directly in the driver SQL thread. If the direct execution of the other events were to update the old-style position, then the position gets updated too far ahead, before the normal events that have been queued for a worker thread have been executed. So this patch adds some special cases to prevent such position updates ahead of time, and instead queues dummy events for the worker threads, so that they will at an appropriate time do the position updates instead. (Also fix a race in a test case that happened to trigger while running tests for this patch).
Diffstat (limited to 'sql/rpl_parallel.h')
-rw-r--r--sql/rpl_parallel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h
index fe9c6708e97..0b9619e5e83 100644
--- a/sql/rpl_parallel.h
+++ b/sql/rpl_parallel.h
@@ -27,6 +27,7 @@ struct rpl_parallel_thread {
char event_relay_log_name[FN_REFLEN];
char future_event_master_log_name[FN_REFLEN];
ulonglong event_relay_log_pos;
+ my_off_t future_event_master_log_pos;
size_t event_size;
} *event_queue, *last_in_queue;
uint64 queued_size;