summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/suite/rpl/disabled.def1
-rw-r--r--sql/slave.cc10
2 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def
index 3b740cbf974..e37ad842790 100644
--- a/mysql-test/suite/rpl/disabled.def
+++ b/mysql-test/suite/rpl/disabled.def
@@ -17,4 +17,3 @@ rpl_row_binlog_max_cache_size : MDEV-11092
rpl_blackhole : MDEV-11094
rpl_row_mysqlbinlog : MDEV-11095
rpl_row_index_choice : MDEV-11666
-rpl_delayed_slave : MDEV-14528
diff --git a/sql/slave.cc b/sql/slave.cc
index d6223453a5b..f3e08f14213 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3962,7 +3962,15 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
*/
if (!(ev->is_artificial_event() || ev->is_relay_log_event() || (ev->when == 0)))
{
- rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
+ /*
+ Ignore FD's timestamp as it does not reflect the slave execution
+ state but likely to reflect a deep past. Consequently when the first
+ data modification event execution last long all this time
+ Seconds_Behind_Master is zero.
+ */
+ if (ev->get_type_code() != FORMAT_DESCRIPTION_EVENT)
+ rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
+
DBUG_ASSERT(rli->last_master_timestamp >= 0);
}
}