summaryrefslogtreecommitdiff
path: root/sql/rpl_parallel.cc
diff options
context:
space:
mode:
authorKristian Nielsen <knielsen@knielsen-hq.org>2014-07-08 12:54:47 +0200
committerKristian Nielsen <knielsen@knielsen-hq.org>2014-07-08 12:54:47 +0200
commit98fc5b3af8b1954e4480ac33d30493aa4de66ec4 (patch)
tree1177381a922f146c32444cc44d5564fbd0f10d8f /sql/rpl_parallel.cc
parente5149fa0d905c6702bd6dcc64c5e3194b6a630fc (diff)
downloadmariadb-git-98fc5b3af8b1954e4480ac33d30493aa4de66ec4.tar.gz
MDEV-5262, MDEV-5914, MDEV-5941, MDEV-6020: Deadlocks during parallel replication causing replication to fail.
After-review changes. For this patch in 10.0, we do not introduce a new public storage engine API, we just fix the InnoDB/XtraDB issues. In 10.1, we will make a better public API that can be used for all storage engines (MDEV-6429). Eliminate the background thread that did deadlock kills asynchroneously. Instead, we ensure that the InnoDB/XtraDB code can handle doing the kill from inside the deadlock detection code (when thd_report_wait_for() needs to kill a later thread to resolve a deadlock). (We preserve the part of the original patch that introduces dedicated mutex and condition for the slave init thread, to remove the abuse of LOCK_thread_count for start/stop synchronisation of the slave init thread).
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r--sql/rpl_parallel.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 621ebc024bb..98753865568 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -240,7 +240,6 @@ convert_kill_to_deadlock_error(rpl_group_info *rgi)
rgi->killed_for_retry)
{
thd->clear_error();
- thd->get_stmt_da()->reset_diagnostics_area();
my_error(ER_LOCK_DEADLOCK, MYF(0));
rgi->killed_for_retry= false;
thd->reset_killed();
@@ -325,7 +324,7 @@ do_retry:
register_wait_for_prior_event_group_commit(rgi, entry);
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
- strcpy(log_name, ir->name);
+ strmake_buf(log_name, ir->name);
if ((fd= open_binlog(&rlog, log_name, &errmsg)) <0)
{
err= 1;