summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-04-30 19:48:11 +0200
committerSergei Golubchik <serg@mariadb.org>2015-05-03 11:21:55 +0200
commitf875c9f2a090f98ba9d9e881165b4cf71cd6a8a2 (patch)
tree6b773c01b2591f368898f293bdfd77d15653910e /sql/rpl_mi.cc
parente6d918cacba8c5f3b002c4eb0244f44c3c941818 (diff)
downloadmariadb-git-f875c9f2a090f98ba9d9e881165b4cf71cd6a8a2.tar.gz
MDEV-5114 seconds_behind_master flips to 0 & spikes back, when running show slaves status
1. After a period of wait (where last_master_timestamp=0) do NOT restore the last_master_timestamp to the timestamp of the last executed event (which would mean we've just executed it, and we're that much behind the master). 2. Update last_master_timestamp before executing the event, not after. Take the approach from the this commit (but with a different test case that actually makes sense): commit 0c75ab453fb8c5439576af8fe5add7a1b89f1569 Author: Luis Soares <luis.soares@sun.com> Date: Thu Apr 15 17:39:31 2010 +0100 BUG#52166: Seconds_Behind_Master spikes after long idle period
Diffstat (limited to 'sql/rpl_mi.cc')
-rw-r--r--sql/rpl_mi.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 50cd44df824..ddc502210ce 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -36,9 +36,9 @@ Master_info::Master_info(LEX_STRING *connection_name_arg,
rli(is_slave_recovery), port(MYSQL_PORT),
checksum_alg_before_fd(BINLOG_CHECKSUM_ALG_UNDEF),
connect_retry(DEFAULT_CONNECT_RETRY), inited(0), abort_slave(0),
- slave_running(0), slave_run_id(0), sync_counter(0),
- heartbeat_period(0), received_heartbeats(0), master_id(0),
- prev_master_id(0),
+ slave_running(0), slave_run_id(0), clock_diff_with_master(0),
+ sync_counter(0), heartbeat_period(0), received_heartbeats(0),
+ master_id(0), prev_master_id(0),
using_gtid(USE_GTID_NO), events_queued_since_last_gtid(0),
gtid_reconnect_event_skip_count(0), gtid_event_seen(false)
{