diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-03-28 17:06:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-03-28 17:31:57 +0200 |
commit | b1818dccf772e0fd495502c6dfc1600853e007d0 (patch) | |
tree | d9c441c38681d634d50cf36021a3bf439b2e44ca /sql/rpl_parallel.cc | |
parent | c34602995894c9a04f4312484cfe6e45c43426e6 (diff) | |
parent | aafb9d44d65e42df72af28c940e5b23b4bc3bd43 (diff) | |
download | mariadb-git-b1818dccf772e0fd495502c6dfc1600853e007d0.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r-- | sql/rpl_parallel.cc | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index b2b13c5467b..9f8a3450716 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -229,6 +229,14 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id, entry->stop_on_error_sub_id= sub_id; mysql_mutex_unlock(&entry->LOCK_parallel_entry); + DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", { + if (rgi->current_gtid.seq_no == 1000) { + DBUG_ASSERT(entry->stop_on_error_sub_id == sub_id); + debug_sync_set_action(thd, + STRING_WITH_LEN("now WAIT_FOR proceed_by_1000")); + } + }); + if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING) wait_for_pending_deadlock_kill(thd, rgi); thd->clear_error(); @@ -722,6 +730,14 @@ do_retry: rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED; thd->set_killed(KILL_CONNECTION); }); + DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", { + if (rgi->current_gtid.seq_no == 1001) { + debug_sync_set_action(thd, + STRING_WITH_LEN("rpl_parallel_simulate_wait_at_retry WAIT_FOR proceed_by_1001")); + } + DEBUG_SYNC(thd, "rpl_parallel_simulate_wait_at_retry"); + }); + rgi->cleanup_context(thd, 1); wait_for_pending_deadlock_kill(thd, rgi); thd->reset_killed(); @@ -745,7 +761,26 @@ do_retry: for (;;) { mysql_mutex_lock(&entry->LOCK_parallel_entry); - register_wait_for_prior_event_group_commit(rgi, entry); + if (entry->stop_on_error_sub_id == (uint64) ULONGLONG_MAX || +#ifndef DBUG_OFF + (DBUG_EVALUATE_IF("simulate_mdev_12746", 1, 0)) || +#endif + rgi->gtid_sub_id < entry->stop_on_error_sub_id) + { + register_wait_for_prior_event_group_commit(rgi, entry); + } + else + { + /* + A failure of a preceeding "parent" transaction may not be + seen by the current one through its own worker_error. + Such induced error gets set by ourselves now. + */ + err= rgi->worker_error= 1; + my_error(ER_PRIOR_COMMIT_FAILED, MYF(0)); + mysql_mutex_unlock(&entry->LOCK_parallel_entry); + goto err; + } mysql_mutex_unlock(&entry->LOCK_parallel_entry); /* |