summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-10-23 15:03:03 +0200
committerunknown <knielsen@knielsen-hq.org>2013-10-23 15:03:03 +0200
commita09d2b105f8e56e8fec98975ea9fa091c263327a (patch)
tree0982c9f747563ca972b85313f62a175141f0a0f6 /sql/rpl_parallel.h
parent7681c6aa787f9d3402059957bd8d993997cb623b (diff)
downloadmariadb-git-a09d2b105f8e56e8fec98975ea9fa091c263327a.tar.gz
MDEV-4506: Parallel replication.
Fix some more parts of old-style position updates. Now we save in rgi some coordinates for master log and relay log, so that in do_update_pos() we can use the right set of coordinates with the right events. The Rotate_log_event::do_update_pos() is fixed in the parallel case to not directly update relay-log.info (as Rotate event runs directly in the driver SQL thread, ahead of actual event execution). Instead, group_master_log_file is updated as part of do_update_pos() in each event execution. In the parallel case, position updates happen in parallel without any ordering, but taking care that position is not updated backwards. Since position update happens only after event execution this leads to the right result. Also fix an access-after-free introduced in an earlier commit.
Diffstat (limited to 'sql/rpl_parallel.h')
-rw-r--r--sql/rpl_parallel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/rpl_parallel.h b/sql/rpl_parallel.h
index 7830470a929..7057ec66de2 100644
--- a/sql/rpl_parallel.h
+++ b/sql/rpl_parallel.h
@@ -24,6 +24,9 @@ struct rpl_parallel_thread {
Log_event *ev;
rpl_group_info *rgi;
ulonglong future_event_relay_log_pos;
+ char event_relay_log_name[FN_REFLEN];
+ char future_event_master_log_name[FN_REFLEN];
+ ulonglong event_relay_log_pos;
} *event_queue, *last_in_queue;
};