diff options
author | Sachin Setiya <sachinsetia1001@gmail.com> | 2017-09-21 13:22:49 +0530 |
---|---|---|
committer | Sachin Setiya <sachinsetia1001@gmail.com> | 2017-09-21 13:22:49 +0530 |
commit | e84f5356c3b99633142e0e8b0dfa9919b75649c3 (patch) | |
tree | 45616572630f036b5e951e87dbd7b423d1023642 | |
parent | 378beed0a680172d6570117c853d803e30983199 (diff) | |
download | mariadb-git-e84f5356c3b99633142e0e8b0dfa9919b75649c3.tar.gz |
MDEV-12290 Wrong timestamps in binary log causes replication issues
Binlog_background_thread does not make a call to set_time(), And when
we call binlog_checkpoint_log_event->write() , we write the wrong timestamp.
In this patch we correct this by calling thd->set_time().
-rw-r--r-- | sql/log.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc index 7a24e3743c0..3d6b0cbbc4a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9278,7 +9278,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); |