diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-03-07 13:21:02 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-03-07 13:21:02 +0100 |
commit | 2db62f686e148f09fe5fd0b385fc71f2a3c4a133 (patch) | |
tree | cf1d5d6f0d05f1b50be96d943476173228cbd458 /sql/rpl_parallel.cc | |
parent | 143f5d9172647a43cdcf5c27b8a78f32c9f639c0 (diff) | |
parent | d61573d3e5c8f9d85b88f9fa2e79160b159bf67d (diff) | |
download | mariadb-git-2db62f686e148f09fe5fd0b385fc71f2a3c4a133.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r-- | sql/rpl_parallel.cc | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 756dafdf534..5a81db45551 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -688,7 +688,7 @@ handle_rpl_parallel_thread(void *arg) } DBUG_ASSERT(qev->typ==rpl_parallel_thread::queued_event::QUEUED_EVENT); - thd->rgi_slave= group_rgi= rgi; + thd->rgi_slave= rgi; gco= rgi->gco; /* Handle a new event group, which will be initiated by a GTID event. */ if ((event_type= qev->ev->get_type_code()) == GTID_EVENT) @@ -705,6 +705,21 @@ handle_rpl_parallel_thread(void *arg) } }); + if(unlikely(thd->wait_for_commit_ptr) && group_rgi != NULL) + { + /* + This indicates that we get a new GTID event in the middle of + a not completed event group. This is corrupt binlog (the master + will never write such binlog), so it does not happen unless + someone tries to inject wrong crafted binlog, but let us still + try to handle it somewhat nicely. + */ + group_rgi->cleanup_context(thd, true); + finish_event_group(rpt, group_rgi->gtid_sub_id, + group_rgi->parallel_entry, group_rgi); + rpt->loc_free_rgi(group_rgi); + } + thd->tx_isolation= (enum_tx_isolation)thd->variables.tx_isolation; in_event_group= true; /* @@ -791,19 +806,6 @@ handle_rpl_parallel_thread(void *arg) unlock_or_exit_cond(thd, &entry->LOCK_parallel_entry, &did_enter_cond, &old_stage); - if(thd->wait_for_commit_ptr) - { - /* - This indicates that we get a new GTID event in the middle of - a not completed event group. This is corrupt binlog (the master - will never write such binlog), so it does not happen unless - someone tries to inject wrong crafted binlog, but let us still - try to handle it somewhat nicely. - */ - rgi->cleanup_context(thd, true); - thd->wait_for_commit_ptr->unregister_wait_for_prior_commit(); - thd->wait_for_commit_ptr->wakeup_subsequent_commits(rgi->worker_error); - } thd->wait_for_commit_ptr= &rgi->commit_orderer; if (opt_gtid_ignore_duplicates) @@ -841,6 +843,7 @@ handle_rpl_parallel_thread(void *arg) } } + group_rgi= rgi; group_ending= is_group_ending(qev->ev, event_type); if (group_ending && likely(!rgi->worker_error)) { |