diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-06-24 10:50:25 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-06-24 10:50:25 +0200 |
commit | 26a9fbc416cc8afaf2099ce293334e85c76b50cb (patch) | |
tree | a49b66fcdbc8775fca1b610019ab5dcc0094af20 /sql/log_event.h | |
parent | 6a0a4f00a1741df68c0d201e090f5d28f59410c8 (diff) | |
download | mariadb-git-26a9fbc416cc8afaf2099ce293334e85c76b50cb.tar.gz |
MDEV-4506: Parallel replication of group-committed transactions: Intermediate commit
First very rough sketch. We spawn and retire a pool of slave threads.
Test main.alias works, most likely not much else does.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index b54e2028ef2..641ab3e37b7 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3080,6 +3080,7 @@ class Gtid_log_event: public Log_event { public: uint64 seq_no; + uint64 commit_id; uint32 domain_id; uchar flags2; @@ -3087,10 +3088,15 @@ public: /* FL_STANDALONE is set when there is no terminating COMMIT event. */ static const uchar FL_STANDALONE= 1; + /* + FL_GROUP_COMMIT_ID is set when event group is part of a group commit on the + master. Groups with same commit_id are part of the same group commit. + */ + static const uchar FL_GROUP_COMMIT_ID= 2; #ifdef MYSQL_SERVER Gtid_log_event(THD *thd_arg, uint64 seq_no, uint32 domain_id, bool standalone, - uint16 flags, bool is_transactional); + uint16 flags, bool is_transactional, uint64 commit_id); #ifdef HAVE_REPLICATION void pack_info(THD *thd, Protocol *protocol); virtual int do_apply_event(Relay_log_info const *rli); @@ -3104,7 +3110,10 @@ public: const Format_description_log_event *description_event); ~Gtid_log_event() { } Log_event_type get_type_code() { return GTID_EVENT; } - int get_data_size() { return GTID_HEADER_LEN; } + int get_data_size() + { + return GTID_HEADER_LEN + ((flags2 & FL_GROUP_COMMIT_ID) ? 2 : 0); + } bool is_valid() const { return seq_no != 0; } #ifdef MYSQL_SERVER bool write(IO_CACHE *file); |