diff options
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc index c1c6a4758d7..b63d72f0d4a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9161,8 +9161,10 @@ int TC_LOG_BINLOG::open(const char *opt_name) if (using_heuristic_recover()) { + mysql_mutex_lock(&LOCK_log); /* generate a new binlog to mask a corrupted one */ open(opt_name, LOG_BIN, 0, WRITE_CACHE, max_binlog_size, 0, TRUE); + mysql_mutex_unlock(&LOCK_log); cleanup(); return 1; } @@ -9483,7 +9485,9 @@ binlog_background_thread(void *arg __attribute__((unused))) while (queue) { THD_STAGE_INFO(thd, stage_binlog_processing_checkpoint_notify); - DEBUG_SYNC(current_thd, "binlog_background_thread_before_mark_xid_done"); + DEBUG_SYNC(thd, "binlog_background_thread_before_mark_xid_done"); + /* Set the thread start time */ + thd->set_time(); /* Grab next pointer first, as mark_xid_done() may free the element. */ next= queue->next_in_queue; mysql_bin_log.mark_xid_done(queue->binlog_id, true); |