diff options
author | unknown <knielsen@knielsen-hq.org> | 2013-06-28 15:19:30 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2013-06-28 15:19:30 +0200 |
commit | 1b3dc66e3117a09c95a00be2f649b975fdb25e2e (patch) | |
tree | db25dcfc0af5b9cccda27ee022dd8bd7acee0ce2 /sql/sql_binlog.cc | |
parent | 7e5dc4f074b7d1cee4721e6fa49d6e5628ef793f (diff) | |
download | mariadb-git-1b3dc66e3117a09c95a00be2f649b975fdb25e2e.tar.gz |
MDEV-4506: Parallel replication: Intermediate commit.
First step of splitting out part of Relay_log_info, so that different
event groups being applied in parallel can each use their own copy.
Diffstat (limited to 'sql/sql_binlog.cc')
-rw-r--r-- | sql/sql_binlog.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 3bb5deab406..bef9a4c3475 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -44,6 +44,7 @@ void mysql_client_binlog_statement(THD* thd) { + struct rpl_group_info *rgi; DBUG_ENTER("mysql_client_binlog_statement"); DBUG_PRINT("info",("binlog base64: '%*s'", (int) (thd->lex->comment.length < 2048 ? @@ -196,6 +197,17 @@ void mysql_client_binlog_statement(THD* thd) } } + if (!(rgi= rli->group_info)) + { + if (!(rgi= rli->group_info= (struct rpl_group_info *) + my_malloc(sizeof(*rgi), MYF(0)))) + { + my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*rgi)); + goto end; + } + bzero(rgi, sizeof(*rgi)); + } + rgi->rli= rli; ev= Log_event::read_log_event(bufptr, event_len, &error, rli->relay_log.description_event_for_exec, 0); @@ -232,7 +244,7 @@ void mysql_client_binlog_statement(THD* thd) (ev->flags & LOG_EVENT_SKIP_REPLICATION_F ? OPTION_SKIP_REPLICATION : 0); - err= ev->apply_event(rli); + err= ev->apply_event(rgi); thd->variables.option_bits= (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) | |