diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-11-13 14:24:40 +0100 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-11-13 14:24:40 +0100 |
commit | 8f2e05f41cf3b92bdb4c409e542ef126d5fe8f95 (patch) | |
tree | 701b5599a3c9478e125535580e294f8b627f2834 /sql/rpl_rli.cc | |
parent | 2828c2be554b62646fc990ac28b4aef20cd9b9d2 (diff) | |
parent | ba02550166eb39c0375a6422ecaa4731421250b6 (diff) | |
download | mariadb-git-8f2e05f41cf3b92bdb4c409e542ef126d5fe8f95.tar.gz |
Merge branch 'mdev7818-4' into 10.1
Conflicts:
mysql-test/suite/perfschema/r/stage_mdl_global.result
sql/rpl_rli.cc
sql/sql_parse.cc
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 7453f57e64c..7bdd9c1861f 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -998,6 +998,18 @@ void Relay_log_info::inc_group_relay_log_pos(ulonglong log_pos, else if (group_master_log_pos < log_pos) group_master_log_pos= log_pos; } + + /* + In the parallel case, we only update the Seconds_Behind_Master at the + end of a transaction. In the non-parallel case, the value is updated as + soon as an event is read from the relay log; however this would be too + confusing for the user, seeing the slave reported as up-to-date when + potentially thousands of events are still queued up for worker threads + waiting for execution. + */ + if (rgi->last_master_timestamp && + rgi->last_master_timestamp > last_master_timestamp) + last_master_timestamp= rgi->last_master_timestamp; } else { @@ -1614,6 +1626,7 @@ rpl_group_info::reinit(Relay_log_info *rli) long_find_row_note_printed= false; did_mark_start_commit= false; gtid_ev_flags2= 0; + last_master_timestamp = 0; gtid_ignore_duplicate_state= GTID_DUPLICATE_NULL; speculation= SPECULATE_NO; commit_orderer.reinit(); |