summaryrefslogtreecommitdiff
path: root/sql/sql_binlog.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-07-12 14:36:20 +0200
committerunknown <knielsen@knielsen-hq.org>2013-07-12 14:36:20 +0200
commitba4b937af2e3c9118071b1279bc39b6febca73a9 (patch)
treead2cf72470e8a031ae5ce0b3f7568cca0faf5340 /sql/sql_binlog.cc
parent6d5f237e091ca7aa4fdd52c186af11fffc80b1c2 (diff)
downloadmariadb-git-ba4b937af2e3c9118071b1279bc39b6febca73a9.tar.gz
MDEV-4506: Parallel replication: Intermediate commit
Move the deferred event stuff from Relay_log_info to rpl_group_info to make it thread safe for parallel replication.
Diffstat (limited to 'sql/sql_binlog.cc')
-rw-r--r--sql/sql_binlog.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc
index df6aab88200..1b6713f1bc3 100644
--- a/sql/sql_binlog.cc
+++ b/sql/sql_binlog.cc
@@ -80,6 +80,8 @@ void mysql_client_binlog_statement(THD* thd)
my_bool have_fd_event= TRUE;
int err;
Relay_log_info *rli;
+ struct rpl_group_info *rgi;
+
rli= thd->rli_fake;
if (!rli)
{
@@ -95,11 +97,12 @@ void mysql_client_binlog_statement(THD* thd)
new Format_description_log_event(4);
have_fd_event= FALSE;
}
+ if (!(rgi= thd->rgi_fake))
+ rgi= thd->rgi_fake= new rpl_group_info(rli);
const char *error= 0;
char *buf= (char *) my_malloc(decoded_len, MYF(MY_WME));
Log_event *ev = 0;
- struct rpl_group_info rgi(rli);
/*
Out of memory check
@@ -197,8 +200,8 @@ void mysql_client_binlog_statement(THD* thd)
}
}
- rgi.rli= rli;
- rgi.thd= thd;
+ rgi->rli= rli;
+ rgi->thd= thd;
ev= Log_event::read_log_event(bufptr, event_len, &error,
rli->relay_log.description_event_for_exec,
0);
@@ -235,7 +238,7 @@ void mysql_client_binlog_statement(THD* thd)
(ev->flags & LOG_EVENT_SKIP_REPLICATION_F ?
OPTION_SKIP_REPLICATION : 0);
- err= ev->apply_event(&rgi);
+ err= ev->apply_event(rgi);
thd->variables.option_bits=
(thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |