summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-04 11:42:37 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-04 11:42:37 +0200
commit2f70784c2aff3bcf67f89f4d8cd121e8f8c3355f (patch)
treefaaec8693d4aa4ba3a71c11a6143fc8d08d1fa95 /sql/log.cc
parent4345d9310080e6e4cbf1040263a2653f7d3d9227 (diff)
parentb6ebadaa66ee68b1880c0e10669543d1ba058c18 (diff)
downloadmariadb-git-2f70784c2aff3bcf67f89f4d8cd121e8f8c3355f.tar.gz
Merge branch '10.7' into 10.8
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 0942a56a236..6aad1f8c724 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -8376,10 +8376,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.
@@ -8669,7 +8671,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(&current->thd->LOCK_thd_data);
run_commit_ordered(current->thd, current->all);
+ mysql_mutex_unlock(&current->thd->LOCK_thd_data);
+ }
current->thd->wakeup_subsequent_commits(current->error);
/*
@@ -10712,6 +10718,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,
@@ -10720,6 +10727,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;
@@ -10734,11 +10742,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)