summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2021-04-16 09:02:00 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2021-04-16 09:02:00 +0530
commit70642871bc404a6844120b5df41b07a36edcdb0f (patch)
treeec4919a150fd7558d8453ff4f6dc99b128078362 /sql/slave.cc
parent2674365c8eac7a18065466d5012928adbf603b5d (diff)
downloadmariadb-git-70642871bc404a6844120b5df41b07a36edcdb0f.tar.gz
MDEV-16437: merge 5.7 P_S replication instrumentation and tables
Merge 'replication_applier_status_by_coordinator' table. This table captures SQL_THREAD status in case of both single threaded and multi threaded slave configuration. When multi_source replication is enabled this table will display each source specific SQL_THREAD status. Added new columns for: - LAST_SEEN_TRANSACTION - LAST_TRANS_RETRY_COUNT
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 5a5e83b977b..1bd2802858c 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -4297,6 +4297,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
DBUG_RETURN(1);
}
+ rli->last_seen_gtid= serial_rgi->current_gtid;
+ rli->last_trans_retry_count= serial_rgi->trans_retries;
if (opt_gtid_ignore_duplicates &&
rli->mi->using_gtid != Master_info::USE_GTID_NO)
{
@@ -5305,6 +5307,7 @@ pthread_handler_t handle_slave_sql(void *arg)
serial_rgi->gtid_sub_id= 0;
serial_rgi->gtid_pending= false;
+ rli->last_seen_gtid= serial_rgi->current_gtid;
if (mi->using_gtid != Master_info::USE_GTID_NO && mi->using_parallel() &&
rli->restart_gtid_pos.count() > 0)
{