diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-10-04 07:41:35 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-10-04 07:41:35 +0200 |
commit | b6ebadaa66ee68b1880c0e10669543d1ba058c18 (patch) | |
tree | 75506bd02a8186a013b5eb16a425de0c1d96bc71 /sql/log.cc | |
parent | 7d4b2b984779e695d0c233d11173b2965d25ef27 (diff) | |
parent | fe449affcf99fcf63f620994b544eb96d2504cda (diff) | |
download | mariadb-git-b6ebadaa66ee68b1880c0e10669543d1ba058c18.tar.gz |
Merge branch '10.6' into 10.7
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index 3d2b47cc79b..f9fd684c620 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -8216,10 +8216,12 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader) DBUG_ENTER("MYSQL_BIN_LOG::trx_group_commit_leader"); { +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("inject_binlog_commit_before_get_LOCK_log", DBUG_ASSERT(!debug_sync_set_action(leader->thd, STRING_WITH_LEN ("commit_before_get_LOCK_log SIGNAL waiting WAIT_FOR cont TIMEOUT 1"))); ); +#endif /* Lock the LOCK_log(), and once we get it, collect any additional writes that queued up while we were waiting. @@ -8509,7 +8511,11 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader) ++num_commits; if (current->cache_mngr->using_xa && likely(!current->error) && !DBUG_IF("skip_commit_ordered")) + { + mysql_mutex_lock(¤t->thd->LOCK_thd_data); run_commit_ordered(current->thd, current->all); + mysql_mutex_unlock(¤t->thd->LOCK_thd_data); + } current->thd->wakeup_subsequent_commits(current->error); /* @@ -10552,6 +10558,7 @@ binlog_background_thread(void *arg __attribute__((unused))) mysql_mutex_unlock(&mysql_bin_log.LOCK_binlog_background_thread); /* Process any incoming commit_checkpoint_notify() calls. */ +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("inject_binlog_background_thread_before_mark_xid_done", DBUG_ASSERT(!debug_sync_set_action( thd, @@ -10560,6 +10567,7 @@ binlog_background_thread(void *arg __attribute__((unused))) "WAIT_FOR something_that_will_never_happen " "TIMEOUT 2"))); ); +#endif while (queue) { long count= queue->notify_count; @@ -10574,11 +10582,13 @@ binlog_background_thread(void *arg __attribute__((unused))) mysql_bin_log.mark_xid_done(queue->binlog_id, true); queue= next; +#ifdef ENABLED_DEBUG_SYNC DBUG_EXECUTE_IF("binlog_background_checkpoint_processed", DBUG_ASSERT(!debug_sync_set_action( thd, STRING_WITH_LEN("now SIGNAL binlog_background_checkpoint_processed"))); ); +#endif } if (stop) |