diff options
author | Sergei Golubchik <serg@mariadb.org> | 2023-02-15 16:30:53 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2023-02-15 16:30:53 +0100 |
commit | b45ed284a69cdbffac61bdcf74bf86fa7b7391a4 (patch) | |
tree | de26ce8e0a5aa40889e889d758e3a3a98b9f71a8 /sql/slave.h | |
parent | cc182aca9352fb7efde0deb0a83844e1d5f0c64c (diff) | |
parent | cafba8761af55ae16cc69c9b53a341340a845b36 (diff) | |
download | mariadb-git-bb-11.0-all-builders.tar.gz |
Merge branch '10.11' into 11.0bb-11.0-all-builders
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/slave.h b/sql/slave.h index 5ca6054a178..e2bd5cec1b9 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -49,6 +49,7 @@ #include "rpl_filter.h" #include "rpl_tblmap.h" #include "rpl_gtid.h" +#include "log_event.h" #define SLAVE_NET_TIMEOUT 60 @@ -293,6 +294,17 @@ extern char *report_host, *report_password; extern I_List<THD> threads; +/* + Check that a binlog event (read from the relay log) is valid to update + last_master_timestamp. That is, a valid event is one with a consistent + timestamp which originated from a primary server. +*/ +static inline bool event_can_update_last_master_timestamp(Log_event *ev) +{ + return ev && !(ev->is_artificial_event() || ev->is_relay_log_event() || + (ev->when == 0)); +} + #else #define close_active_mi() /* no-op */ #endif /* HAVE_REPLICATION */ |